open class ConfigurationClassPostProcessor : BeanDefinitionRegistryPostProcessor, PriorityOrdered, ResourceLoaderAware, BeanClassLoaderAware, EnvironmentAware
BeanFactoryPostProcessor used for bootstrapping processing of Configuration classes.
Registered by default when using <context:annotation-config/> or <context:component-scan/>. Otherwise, may be declared manually as with any other BeanFactoryPostProcessor.
This post processor is Ordered#HIGHEST_PRECEDENCE as it is important that any Bean methods declared in Configuration classes have their respective bean definitions registered before any other BeanFactoryPostProcessor executes.
Author
Chris Beams
Author
Juergen Hoeller
Author
Phillip Webb
Since
3.0
ConfigurationClassPostProcessor()
BeanFactoryPostProcessor used for bootstrapping processing of Configuration classes. Registered by default when using This post processor is |
open fun enhanceConfigurationClasses(beanFactory: ConfigurableListableBeanFactory): Unit
Post-processes a BeanFactory in search of Configuration class BeanDefinitions; any candidates are then enhanced by a ConfigurationClassEnhancer. Candidate status is determined by BeanDefinition attribute metadata. |
|
open fun getOrder(): Int |
|
open fun postProcessBeanDefinitionRegistry(registry: BeanDefinitionRegistry): Unit
Derive further bean definitions from the configuration classes in the registry. |
|
open fun postProcessBeanFactory(beanFactory: ConfigurableListableBeanFactory): Unit
Prepare the Configuration classes for servicing bean requests at runtime by replacing them with CGLIB-enhanced subclasses. |
|
open fun processConfigBeanDefinitions(registry: BeanDefinitionRegistry): Unit
Build and validate a configuration model based on the registry of Configuration classes. |
|
open fun setBeanClassLoader(beanClassLoader: ClassLoader): Unit |
|
open fun setBeanNameGenerator(beanNameGenerator: BeanNameGenerator): Unit
Set the BeanNameGenerator to be used when triggering component scanning from Configuration classes and when registering Import'ed configuration classes. The default is a standard AnnotationBeanNameGenerator for scanned components (compatible with the default in ClassPathBeanDefinitionScanner) and a variant thereof for imported configuration classes (using unique fully-qualified class names instead of standard component overriding). Note that this strategy does not apply to Bean methods. This setter is typically only appropriate when configuring the post-processor as a standalone bean definition in XML, e.g. not using the dedicated |
|
open fun setEnvironment(environment: Environment): Unit |
|
open fun setMetadataReaderFactory(metadataReaderFactory: MetadataReaderFactory): Unit
Set the MetadataReaderFactory to use. Default is a CachingMetadataReaderFactory for the specified bean class loader. |
|
open fun setProblemReporter(problemReporter: ProblemReporter): Unit
Set the ProblemReporter to use. Used to register any problems detected with Configuration or Bean declarations. For instance, an @Bean method marked as |
|
open fun setResourceLoader(resourceLoader: ResourceLoader): Unit |
|
open fun setSourceExtractor(sourceExtractor: SourceExtractor): Unit
Set the SourceExtractor to use for generated bean definitions that correspond to Bean factory methods. |