Class AnnotationConfigUtils
java.lang.Object
org.springframework.context.annotation.AnnotationConfigUtils
Utility class that allows for convenient registration of common
 
BeanPostProcessor and
 BeanFactoryPostProcessor
 definitions for annotation-based configuration. Also registers a common
 AutowireCandidateResolver.- Since:
- 2.5
- Author:
- Mark Fisher, Juergen Hoeller, Chris Beams, Phillip Webb, Stephane Nicoll
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe bean name of the internally managed Autowired annotation processor.static final StringThe bean name of the internally managed common annotation processor.static final StringThe bean name of the internally managed Configuration annotation processor.static final StringThe bean name of the internally managed BeanNameGenerator for use when processingConfigurationclasses.static final StringThe bean name of the internally managed EventListenerFactory.static final StringThe bean name of the internally managed @EventListener annotation processor.static final StringThe bean name of the internally managed JPA annotation processor.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidstatic voidRegister all relevant annotation post processors in the given registry.static Set<BeanDefinitionHolder>registerAnnotationConfigProcessors(BeanDefinitionRegistry registry, Object source) Register all relevant annotation post processors in the given registry.
- 
Field Details- 
CONFIGURATION_ANNOTATION_PROCESSOR_BEAN_NAMEThe bean name of the internally managed Configuration annotation processor.- See Also:
 
- 
CONFIGURATION_BEAN_NAME_GENERATORThe bean name of the internally managed BeanNameGenerator for use when processingConfigurationclasses. Set byAnnotationConfigApplicationContextandAnnotationConfigWebApplicationContextduring bootstrap in order to make any custom name generation strategy available to the underlyingConfigurationClassPostProcessor.- Since:
- 3.1.1
- See Also:
 
- 
AUTOWIRED_ANNOTATION_PROCESSOR_BEAN_NAMEThe bean name of the internally managed Autowired annotation processor.- See Also:
 
- 
COMMON_ANNOTATION_PROCESSOR_BEAN_NAMEThe bean name of the internally managed common annotation processor.- See Also:
 
- 
PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAMEThe bean name of the internally managed JPA annotation processor.- See Also:
 
- 
EVENT_LISTENER_PROCESSOR_BEAN_NAMEThe bean name of the internally managed @EventListener annotation processor.- See Also:
 
- 
EVENT_LISTENER_FACTORY_BEAN_NAMEThe bean name of the internally managed EventListenerFactory.- See Also:
 
 
- 
- 
Constructor Details- 
AnnotationConfigUtilspublic AnnotationConfigUtils()
 
- 
- 
Method Details- 
registerAnnotationConfigProcessorsRegister all relevant annotation post processors in the given registry.- Parameters:
- registry- the registry to operate on
 
- 
registerAnnotationConfigProcessorspublic static Set<BeanDefinitionHolder> registerAnnotationConfigProcessors(BeanDefinitionRegistry registry, @Nullable Object source) Register all relevant annotation post processors in the given registry.- Parameters:
- registry- the registry to operate on
- source- the configuration source element (already extracted) that this registration was triggered from. May be- null.
- Returns:
- a Set of BeanDefinitionHolders, containing all bean definitions that have actually been registered by this call
 
- 
processCommonDefinitionAnnotations
 
-