Annotation Interface RefreshScope


@Target({TYPE,METHOD}) @Retention(RUNTIME) @Scope("refresh") @Documented public @interface RefreshScope
Convenience annotation to put a @Bean definition in refresh scope. Beans annotated this way can be refreshed at runtime and any components that are using them will get a new instance on the next method call, fully initialized and injected with all dependencies.
Author:
Dave Syer
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    org.springframework.context.annotation.ScopedProxyMode
    Alias for Scope.proxyMode().
  • Element Details

    • proxyMode

      @AliasFor(annotation=org.springframework.context.annotation.Scope.class) org.springframework.context.annotation.ScopedProxyMode proxyMode
      Alias for Scope.proxyMode().
      Returns:
      proxy mode
      See Also:
      • Scope.proxyMode()
      Default:
      TARGET_CLASS