applicationContext.xml 2.3 KB
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
		http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		 http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
          http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
    
    <!-- 加载ehcache配置 -->
	<import resource="classpath:spring-ehcache.xml"/>

	<!-- 测试服务器配置 -->
	<import resource="classpath:META-INF/conf/conf.xml" />
	<!-- 正式环境配置 -->
	<!-- <import resource="classpath:META-INF/conf/conf.xml"/> -->
	<!-- 数据源 -->
	<import resource="classpath:META-INF/conf/spring-config-datasource.xml" />
	
	<import resource="classpath:applicationContext-jms.xml" />
	<import resource="classpath:applicationContext-jms-listener.xml" />
	<import resource="classpath:applicationContext-jms-messageListener.xml" />
	
	<!-- 开启注解配置 -->
	<context:annotation-config />
	<!-- 开启AOP监听 只对当前配置文件有效 -->
	<aop:aspectj-autoproxy expose-proxy="true" />

	<!-- 启用组件扫描和自动装配 ,排除@Controller组件,Controller由SpringMVC配置文件扫描 -->
	<context:component-scan base-package="com.sibu.orderHelper.base.service.*">
		<context:exclude-filter type="annotation"
			expression="org.springframework.stereotype.Controller" />
	</context:component-scan>
	<context:component-scan base-package="com.sibu.orderHelper.integral.web.service.*">
		<context:exclude-filter type="annotation"
			expression="org.springframework.stereotype.Controller" />
	</context:component-scan>
	
	<!-- 加载redis集群的配置文件 -->
	<import resource="classpath:META-INF/conf/spring-config-redis.xml"/>
	
	<!-- 加载单独redis的配置文件
	<import resource="classpath:spring-config-one-redis.xml"/> -->
	
	<bean class="com.sibu.orderHelper.common.util.SpringUtils"/>
</beans>