public interface MergedBeanDefinitionPostProcessor extends BeanPostProcessor
BeanPostProcessor
implementations may implement this sub-interface in order
to post-process the merged bean definition (a processed copy of the original bean
definition) that the Spring BeanFactory
uses to create a bean instance.
The postProcessMergedBeanDefinition(org.springframework.beans.factory.support.RootBeanDefinition, java.lang.Class<?>, java.lang.String)
method may for example introspect
the bean definition in order to prepare some cached metadata before post-processing
actual instances of a bean. It is also allowed to modify the bean definition but
only for definition properties which are actually intended for concurrent
modification. Essentially, this only applies to operations defined on the
RootBeanDefinition
itself but not to the properties of its base classes.
ConfigurableBeanFactory.getMergedBeanDefinition(java.lang.String)
Modifier and Type | Method and Description |
---|---|
void |
postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition,
Class<?> beanType,
String beanName)
Post-process the given merged bean definition for the specified bean.
|
default void |
resetBeanDefinition(String beanName)
A notification that the bean definition for the specified name has been reset,
and that this post-processor should clear any metadata for the affected bean.
|
postProcessAfterInitialization, postProcessBeforeInitialization
void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName)
beanDefinition
- the merged bean definition for the beanbeanType
- the actual type of the managed bean instancebeanName
- the name of the beanAbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(org.springframework.beans.factory.support.RootBeanDefinition, java.lang.Class<?>, java.lang.String)
default void resetBeanDefinition(String beanName)
The default implementation is empty.
beanName
- the name of the beanDefaultListableBeanFactory.resetBeanDefinition(java.lang.String)