spring解析context:annotation-config时所对应的处理类
spring配置中的响应的处理类
context:component-scan
context:annotation-config
.....
以上标签spring解析时,代码delegate.parseCustomElement(ele);
使用了applicationContext.xml注明的命名空间进行查询NamespaceHandler,如下:
public class ContextNamespaceHandler extends NamespaceHandlerSupport {public void init() {registerBeanDefinitionParser("property-placeholder", new PropertyPlaceholderBeanDefinitionParser());registerBeanDefinitionParser("property-override", new PropertyOverrideBeanDefinitionParser());registerBeanDefinitionParser("annotation-config", new AnnotationConfigBeanDefinitionParser());registerBeanDefinitionParser("component-scan", new ComponentScanBeanDefinitionParser());registerBeanDefinitionParser("load-time-weaver", new LoadTimeWeaverBeanDefinitionParser());registerBeanDefinitionParser("spring-configured", new SpringConfiguredBeanDefinitionParser());registerBeanDefinitionParser("mbean-export", new MBeanExportBeanDefinitionParser());registerBeanDefinitionParser("mbean-server", new MBeanServerBeanDefinitionParser());}}