`

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());
	}

}
分享到:
评论

相关推荐

    Spring注解详解

    <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> <context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/> ...

    spring

    context:annotation-config:作用是可以使用@ Autowired,@ Inject等来省略xml配置文件中的属性属性,简化配置; context:component-scan:作用是可以使用@ Component,@ Controller,@ Service等等来省略xml...

    Spring Context测试

    学习spring组件扫描(Component Scanning)的代码 ...<context:annotation-config /> <context:component-scan base-package="com.test"></context:component-scan> 2.在需要装配的类的上面全部加上@Component

    spring mvc aop

    spring mvc aop <context:annotation-config />

    struts2.3+hibernate3.6+spring3.1整合的纯xml配置的小项目

    <context:annotation-config></context:annotation-config> <context:component-scan base-package="org.whvcse"></context:component-scan> <tx:annotation-driven transaction-manager="txManager" /> <!-- ...

    Spring AOP配置源码

    </beans><context:annotation-config/> <context:component-scan base-package="com.spring.*"/> 两行为开启spring的注解配置 <aop:aspect id="aspect" ref="logIntercepter"> 引入具体的AOP操作类 <aop:pointcut ...

    维生药业小项目 SSH简单学习项目

    <context:annotation-config/> <property name="driverClass" value="com.mysql.jdbc.Driver"></property> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/six?zeroDateTimeBehavior=...

    Spring3中配置DBCP,C3P0,Proxool,Bonecp数据源

    <context:annotation-config /> <context:component-scan base-package="com.mvc" /> <mvc:annotation-driven /> <mvc:resources mapping="/resources/**" location="/resources/" /> <mvc:default-servlet-...

    SpringMVC+Hibernate全注解整合

    <context:annotation-config/> <context:component-scan base-package="com.org.*" /> <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> ...

    springmvc-ibatis

    <context:annotation-config/> <!-- 扫描包 --> <context:component-scan base-package="com.org"/> <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver...

    java8stream源码-java:java及相关(电话/微信:15850669069,qq:1056764180)

    context:annotation-config vscontext:component-scan linux部署运维 [Linux Tune Network Stack (Buffers Size) To Increase Networking Performance]) c++ 其他 [Real Time Analytics with Druid, Spark, and ...

    javaweb项目常用jar包

    spring-security-config-3.1.6.RELEASE.jar spring-security-core-3.1.6.RELEASE.jar spring-security-crypto-3.1.6.RELEASE.jar spring-security-ldap-3.1.6.RELEASE.jar spring-security-openid-3.1.6.RELEASE...

    Struts2+Spring3+MyBatis3完整实例

    org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,accountBiz,dataSource,sqlSessionFactory,...

    spring3.2+strut2+hibernate4

    <context:annotation-config /> <!-- <bean id="sessionFactory"--> <!-- class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">--> <!-- <property name="configLocation"--> <!-- value=...

    spring aop 实现源代码--xml and annotation(带lib包)

    在Spring1.2或之前的版本中,实现AOP的传统方式就是通过实现Spring的AOP API来定义Advice,并设置代理对象。Spring根据Adivce加入到业务流程的时机的不同,提供了四种不同的Advice:Before Advice、After Advice、...

    spring_MVC源码

    10. <context:annotation-config /> 11. <!-- 把标记了@Controller注解的类转换为bean --> 12. <context:component-scan base-package="com.mvc.controller" /> 13. <!-- 启动Spring MVC的注解功能,...

    轻量级高性能 RPC 框架 HRPC.zip

     <context:annotation-config/>  <context:property-placeholder location="classpath:system.properties"/>  <!--客户端配置-->   id="rpcClient" class="com.yingjun.rpc.client.RPCClient">  ...

    spring applicationContext 配置文件

    <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping" p:order="0"> <property name="interceptors"> <list> <ref bean="doubleSubmitInterceptor"/> </list> ...

    SpringMVC-SSH全注解

    -- 配置那个类那个方法用到事务处理 --> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="get*" read-only="true" /> <tx:method name="add*" ...

Global site tag (gtag.js) - Google Analytics