类 ReferenceAnnotationBeanPostProcessor

  • 所有已实现的接口:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor, org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor, org.springframework.context.ApplicationContextAware, org.springframework.context.EnvironmentAware, org.springframework.core.Ordered

    public class ReferenceAnnotationBeanPostProcessor
    extends AbstractAnnotationBeanPostProcessor
    implements org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.config.BeanFactoryPostProcessor

    Step 1: The purpose of implementing BeanFactoryPostProcessor is to scan the registration reference bean definition earlier, so that it can be shared with the xml bean configuration.

    Step 2: By implementing InstantiationAwareBeanPostProcessor, inject the reference bean instance into the fields and setter methods which annotated with DubboReference.

    从以下版本开始:
    2.5.7
    另请参阅:
    DubboReference, Reference, Reference
    • 方法详细资料

      • postProcessBeanFactory

        public void postProcessBeanFactory​(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
                                    throws org.springframework.beans.BeansException
        指定者:
        postProcessBeanFactory 在接口中 org.springframework.beans.factory.config.BeanFactoryPostProcessor
        抛出:
        org.springframework.beans.BeansException
      • postProcessMergedBeanDefinition

        public void postProcessMergedBeanDefinition​(org.springframework.beans.factory.support.RootBeanDefinition beanDefinition,
                                                    Class<?> beanType,
                                                    String beanName)
        指定者:
        postProcessMergedBeanDefinition 在接口中 org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor
        覆盖:
        postProcessMergedBeanDefinition 在类中 AbstractAnnotationBeanPostProcessor
      • postProcessBeforeInitialization

        public Object postProcessBeforeInitialization​(Object bean,
                                                      String beanName)
                                               throws org.springframework.beans.BeansException
        指定者:
        postProcessBeforeInitialization 在接口中 org.springframework.beans.factory.config.BeanPostProcessor
        覆盖:
        postProcessBeforeInitialization 在类中 org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter
        抛出:
        org.springframework.beans.BeansException
      • postProcessPropertyValues

        public org.springframework.beans.PropertyValues postProcessPropertyValues​(org.springframework.beans.PropertyValues pvs,
                                                                                  PropertyDescriptor[] pds,
                                                                                  Object bean,
                                                                                  String beanName)
                                                                           throws org.springframework.beans.BeansException
        指定者:
        postProcessPropertyValues 在接口中 org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessor
        覆盖:
        postProcessPropertyValues 在类中 AbstractAnnotationBeanPostProcessor
        抛出:
        org.springframework.beans.BeansException
      • registerReferenceBean

        public String registerReferenceBean​(String propertyName,
                                            Class<?> injectedType,
                                            Map<String,​Object> attributes,
                                            Member member)
                                     throws org.springframework.beans.BeansException
        抛出:
        org.springframework.beans.BeansException
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        指定者:
        setApplicationContext 在接口中 org.springframework.context.ApplicationContextAware
        抛出:
        org.springframework.beans.BeansException
      • getInjectedFieldReferenceBeanMap

        public Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,​ReferenceBean<?>> getInjectedFieldReferenceBeanMap()
        Get ReferenceBean Map in injected field.
        返回:
        non-null Map
        从以下版本开始:
        2.5.11
      • getInjectedMethodReferenceBeanMap

        public Map<org.springframework.beans.factory.annotation.InjectionMetadata.InjectedElement,​ReferenceBean<?>> getInjectedMethodReferenceBeanMap()
        Get ReferenceBean Map in injected method.
        返回:
        non-null Map
        从以下版本开始:
        2.5.11