Package org.springframework.beans.factory.support

# Interface BeanDefinitionRegistryPostProcessor

All Superinterfaces:
  `BeanFactoryPostProcessor`

public interface BeanDefinitionRegistryPostProcessor extends 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.

Since:
  3.0.1
Author:
  Juergen Hoeller
See Also:
  - `org.springframework.context.annotation.ConfigurationClassPostProcessor`

## Method Summary

Modifier and Type
Method
Description
`void`
`postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry)`
Modify the application context's internal bean definition registry after its standard initialization.
`default void`
`postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)`
Empty implementation of `BeanFactoryPostProcessor.postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory)` since custom `BeanDefinitionRegistryPostProcessor` implementations will typically only provide a `postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry)` method.

## Method Details

### postProcessBeanDefinitionRegistry

void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException
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.

Parameters:
  `registry` - the bean definition registry used by the application context
Throws:
  `BeansException` - in case of errors

### postProcessBeanFactory

default void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
Empty implementation of `BeanFactoryPostProcessor.postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory)` since custom `BeanDefinitionRegistryPostProcessor` implementations will typically only provide a `postProcessBeanDefinitionRegistry(org.springframework.beans.factory.support.BeanDefinitionRegistry)` method.

Specified by:
  `postProcessBeanFactory` in interface `BeanFactoryPostProcessor`
Parameters:
  `beanFactory` - the bean factory used by the application context
Throws:
  `BeansException` - in case of errors
Since:
  6.1