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 Summary
FieldsModifier 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 Summary
Constructors -
Method Summary
Modifier 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_NAME
The bean name of the internally managed Configuration annotation processor.- See Also:
-
CONFIGURATION_BEAN_NAME_GENERATOR
The 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_NAME
The bean name of the internally managed Autowired annotation processor.- See Also:
-
COMMON_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed common annotation processor.- See Also:
-
PERSISTENCE_ANNOTATION_PROCESSOR_BEAN_NAME
The bean name of the internally managed JPA annotation processor.- See Also:
-
EVENT_LISTENER_PROCESSOR_BEAN_NAME
The bean name of the internally managed @EventListener annotation processor.- See Also:
-
EVENT_LISTENER_FACTORY_BEAN_NAME
The bean name of the internally managed EventListenerFactory.- See Also:
-
-
Constructor Details
-
AnnotationConfigUtils
public AnnotationConfigUtils()
-
-
Method Details
-
registerAnnotationConfigProcessors
Register all relevant annotation post processors in the given registry.- Parameters:
registry- the registry to operate on
-
registerAnnotationConfigProcessors
public 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 onsource- the configuration source element (already extracted) that this registration was triggered from. May benull.- Returns:
- a Set of BeanDefinitionHolders, containing all bean definitions that have actually been registered by this call
-
processCommonDefinitionAnnotations
-