接口 ImportBeanDefinitionRegistrar
- 所有已知实现类:
AutoProxyRegistrar
public interface ImportBeanDefinitionRegistrar
Interface to be implemented by types that register additional bean definitions when processing @Configurationclasses. Useful when operating at the bean definition level (as opposed to@Beanmethod/instance level) is desired or necessary.Along with
@ConfigurationandImportSelector, classes of this type may be provided to the @Importannotation (or may also be returned from anImportSelector).An
ImportBeanDefinitionRegistrarmay implement any of the followingAwareinterfaces, and their respective methods will be called prior toregisterBeanDefinitions(org.springframework.core.type.AnnotationMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry):See implementations and associated unit tests for usage examples.
- 从以下版本开始:
- 3.1
- 作者:
- Chris Beams
- 另请参阅:
Import,ImportSelector,Configuration
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 voidregisterBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)Register bean definitions as necessary based on the given annotation metadata of the importing@Configurationclass.
方法详细资料
registerBeanDefinitions
void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry)
Register bean definitions as necessary based on the given annotation metadata of the importing@Configurationclass.Note that
BeanDefinitionRegistryPostProcessortypes may not be registered here, due to lifecycle constraints related to@Configurationclass processing.- 参数:
importingClassMetadata- annotation metadata of the importing classregistry- current bean definition registry