spring-framework / org.springframework.beans.factory.support / BeanDefinitionRegistryPostProcessor

BeanDefinitionRegistryPostProcessor

interface BeanDefinitionRegistryPostProcessor : BeanFactoryPostProcessor

Extension to the standard BeanFactoryPostProcessor SPI, allowing for the registration of further bean definitions before regular BeanFactoryPostProcessor detection kicks in. In particular, BeanDefinitionRegistryPostProcessor may register further bean definitions which in turn define BeanFactoryPostProcessor instances.

Author
Juergen Hoeller

Since
3.0.1

See Also
org.springframework.context.annotation.ConfigurationClassPostProcessor

Functions

postProcessBeanDefinitionRegistry

abstract fun postProcessBeanDefinitionRegistry(registry: BeanDefinitionRegistry): Unit

Modify the application context's internal bean definition registry after its standard initialization. All regular bean definitions will have been loaded, but no beans will have been instantiated yet. This allows for adding further bean definitions before the next post-processing phase kicks in.

Inheritors

ConfigurationClassPostProcessor

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.