Annotation Interface Proxyable


@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented public @interface Proxyable
Common annotation for suggesting a specific proxy type for a @Bean method or @Component class, overriding a globally configured default.

Only actually applying in case of a bean actually getting auto-proxied in the first place. Actual auto-proxying is dependent on external configuration.

Since:
7.0
Author:
Juergen Hoeller
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Suggest a JDK dynamic proxy with specific interfaces to expose, overriding a globally configured default.
    Suggest a specific proxy type, either ProxyType.INTERFACES for a JDK dynamic proxy or ProxyType.TARGET_CLASS for a CGLIB proxy, overriding a globally configured default.
  • Element Details

    • value

      ProxyType value
      Suggest a specific proxy type, either ProxyType.INTERFACES for a JDK dynamic proxy or ProxyType.TARGET_CLASS for a CGLIB proxy, overriding a globally configured default.
      Default:
      DEFAULT
    • interfaces

      Class<?>[] interfaces
      Suggest a JDK dynamic proxy with specific interfaces to expose, overriding a globally configured default.

      Only taken into account if value() is not ProxyType.TARGET_CLASS.

      Default:
      {}