Annotation Type ManagementContextConfiguration
@Configuration
class that defines configuration
specific for the management context. Configurations should be registered in
/META-INF/spring.factories
under the
org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration
key.
ManagementContextConfiguration
classes can be ordered using
@Order
. Ordering by implementing Ordered
is not supported and
will have no effect.
- Since:
- 2.0.0
- Author:
- Phillip Webb, Andy Wilkinson
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Specify whether@Bean
methods should get proxied in order to enforce bean lifecycle behavior, e.g.Specifies the type of management context that is required for this configuration to be applied.
-
Element Details
-
value
ManagementContextType valueSpecifies the type of management context that is required for this configuration to be applied.- Returns:
- the required management context type
- Since:
- 2.0.0
- Default:
- ANY
-
proxyBeanMethods
@AliasFor(annotation=org.springframework.context.annotation.Configuration.class) boolean proxyBeanMethodsSpecify whether@Bean
methods should get proxied in order to enforce bean lifecycle behavior, e.g. to return shared singleton bean instances even in case of direct@Bean
method calls in user code. This feature requires method interception, implemented through a runtime-generated CGLIB subclass which comes with limitations such as the configuration class and its methods not being allowed to declarefinal
.The default is
true
, allowing for 'inter-bean references' within the configuration class as well as for external calls to this configuration's@Bean
methods, e.g. from another configuration class. If this is not needed since each of this particular configuration's@Bean
methods is self-contained and designed as a plain factory method for container use, switch this flag tofalse
in order to avoid CGLIB subclass processing.Turning off bean method interception effectively processes
@Bean
methods individually like when declared on non-@Configuration
classes, a.k.a. "@Bean Lite Mode" (see@Bean's javadoc
). It is therefore behaviorally equivalent to removing the@Configuration
stereotype.- Returns:
- whether to proxy
@Bean
methods - Since:
- 2.2
- Default:
- true
-