spring.xml 2.6 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:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:cache="http://www.springframework.org/schema/cache"
	xsi:schemaLocation="http://www.springframework.org/schema/beans 
       		http://www.springframework.org/schema/beans/spring-beans.xsd 
       		http://www.springframework.org/schema/context 
       		http://www.springframework.org/schema/context/spring-context.xsd
       		http://www.springframework.org/schema/aop 
       		http://www.springframework.org/schema/aop/spring-aop.xsd
			http://www.springframework.org/schema/cache
			http://www.springframework.org/schema/cache/spring-cache.xsd"
	default-autowire="byName">

	<context:annotation-config />

	<cache:annotation-driven cache-manager="cacheManager"
		key-generator="cacheKeyGenerator" />

	<aop:aspectj-autoproxy proxy-target-class="true" />

	<bean id="propertyConfigurer"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
		<property name="ignoreResourceNotFound" value="true" />
		<property name="locations">
			<list>
				<value>classpath:conf/jdbc.properties</value>
				<value>classpath:conf/config.properties</value>
				<value>classpath:conf/manage.properties</value>
			</list>
		</property>
	</bean>

	<bean id="webUtils" class="com.b2c.dtms.common.tools.WebUtils">
		<property name="assetsPath" value="${orders.contextPath}/assets" />
		<property name="contextPath" value="${orders.contextPath}" />
	</bean>
	<bean id="currencyTool" class="com.b2c.dtms.common.tools.CurrencyTool" />

	<!-- Access resource bundles with the specified basename -->
	<bean id="messageSource"
		class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
		<!-- <property name="basenames" value="/WEB-INF/i18n/content,/WEB-INF/i18n/validation,/WEB-INF/i18n/asset,/WEB-INF/i18n/enum" 
			/> -->
		<property name="basenames">
			<list>
				<value>/WEB-INF/i18n/msg-notice-template</value>
				<value>/WEB-INF/i18n/msg-todoitem-template</value>
			</list>
		</property>
		<!-- 刷新资源文件的周期,以秒为单位 -->
		<property name="cacheSeconds" value="60" />
	</bean>

	<import resource="classpath*:spring-service.xml" />
	<import resource="classpath*:spring-dao.xml" />
	<import resource="classpath*:spring-redis.xml" />
	<import resource="classpath*:spring-dtms.xml" />
	<import resource="classpath*:spring-rpc.xml" />
</beans>