Annotation Type Retry


@Retention(RUNTIME) @Target(METHOD) @Inherited public @interface Retry
The Retry annotation instructs Spring to retry a method execution when catching a given Throwable.
Since:
3.1.0
Author:
Vlad Mihalcea
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Throwable>[]
    Declare the throwable types the retry will be executed for.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The number of retry attempts
  • Element Details

    • on

      Class<? extends Throwable>[] on
      Declare the throwable types the retry will be executed for.
      Returns:
      throwable types triggering a retry
    • times

      int times
      The number of retry attempts
      Returns:
      retry attempts
      Default:
      1