<context:annotation-config/>

<context:annotation-config/>  

解析上面标签,运行下面解析

AnnotationConfigBeanDefinitioinParser implements BeanDefinitionParser{

     public BeanDefinition parse(Element element, ParserContext parserContext) {

         AnnotationConfigUtils.registerAnnotationConfigProcessor();

    }

}

 

自动注册ConfigurationClassPostProcessor, AutowiredAnnotationBeanPostProcessor,  RequiredAnnotationBeanPostProcessor,  

CommonAnnotationBeanPostProcessor等类到BeanDefinition 

 

AutowiredAnnotationBeanPostProcessor类会处理Autowired和Value注解

 

 

 

 

posted @ 2019-12-12 18:07  java.matt  阅读(171)  评论(0编辑  收藏  举报