Annotation Interface EnableResilientMethods


@Target(TYPE) @Retention(RUNTIME) @Documented @Import(ResilientMethodsConfiguration.class) public @interface EnableResilientMethods
Enables Spring's core resilience features for method invocations: @Retryable as well as @ConcurrencyLimit.

These annotations can also be individually enabled by defining a RetryAnnotationBeanPostProcessor or a ConcurrencyLimitBeanPostProcessor.

Since:
7.0
Author:
Juergen Hoeller
See Also:
  • Element Details

    • proxyTargetClass

      boolean proxyTargetClass
      Indicate whether subclass-based (CGLIB) proxies are to be created as opposed to standard Java interface-based proxies.

      The default is false.

      Note that setting this attribute to true will affect all Spring-managed beans requiring proxying, not just those marked with @Retryable or @ConcurrencyLimit. For example, other beans marked with Spring's @Transactional annotation will be upgraded to subclass proxying at the same time. This approach has no negative impact in practice unless one is explicitly expecting one type of proxy vs. another — for example, in tests.

      Default:
      false
    • order

      int order
      Indicate the order in which the RetryAnnotationBeanPostProcessor and ConcurrencyLimitBeanPostProcessor should be applied.

      The default is Ordered.LOWEST_PRECEDENCE in order to run after all other post-processors, so that they can add advisors to existing proxies rather than double-proxy.

      Default:
      2147483647