Browse Source

Merge branch 'dev-mysql' into feature_release-tomysql

liusw 7 years ago
parent
commit
bbfa719664
1 changed files with 22 additions and 22 deletions
  1. 22 22
      src/main/resources/spring/context.xml

+ 22 - 22
src/main/resources/spring/context.xml

@@ -1,9 +1,9 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
-	xmlns:context="http://www.springframework.org/schema/context"
-	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:task="http://www.springframework.org/schema/task"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
-	xmlns:cache="http://www.springframework.org/schema/cache" xmlns:util="http://www.springframework.org/schema/util"
-	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd   
+	   xmlns:context="http://www.springframework.org/schema/context"
+	   xmlns:aop="http://www.springframework.org/schema/aop" xmlns:task="http://www.springframework.org/schema/task"
+	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
+	   xmlns:cache="http://www.springframework.org/schema/cache" xmlns:util="http://www.springframework.org/schema/util"
+	   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
 	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
 	http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
 	http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.1.xsd
@@ -15,17 +15,17 @@
 		  class="com.uas.platform.b2c.core.support.EncryptablePropertyPlaceholderConfigurer">
 		<property name="locations">
 			<list>
-				<value>classpath*:dev/*.properties</value>
+				<value>classpath*:${profile}/*.properties</value>
 			</list>
 		</property>
 	</bean>
-	<!--<context:property-placeholder location="classpath*:dev/*.properties" />-->
+	<!--<context:property-placeholder location="classpath*:${profile}/*.properties" />-->
 	<!-- 系统运行参数注入 -->
 	<util:properties id="sys"
-		location="classpath:dev/sys.properties" />
+					 location="classpath:${profile}/sys.properties" />
 	<!-- 消息参数 -->
 	<util:properties id="message"
-		location="classpath:dev/message.properties" />
+					 location="classpath:${profile}/message.properties" />
 	<!-- 注册spring上下文对象 -->
 	<bean class="com.uas.platform.b2c.core.support.ApplicationContextRegister" />
 	<!-- 容器启动完成之后执行 -->
@@ -46,11 +46,11 @@
 
 	<!--开启注解调度支持 @Async @Scheduled -->
 	<task:annotation-driven executor="executor"
-		scheduler="scheduler" proxy-target-class="true" />
+							scheduler="scheduler" proxy-target-class="true" />
 
 	<!-- 国际化的消息资源文件(本系统中主要用于显示/错误消息定制) -->
 	<bean id="messageSource"
-		class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
+		  class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
 		<property name="basenames">
 			<list>
 				<value>classpath:spring/messages</value>
@@ -62,7 +62,7 @@
 	</bean>
 
 	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
-		destroy-method="close">
+		  destroy-method="close">
 		<property name="driverClassName" value="${jdbc.driverClassName}" />
 		<property name="url" value="${jdbc.url}" />
 		<property name="username" value="${jdbc.username}" />
@@ -91,27 +91,27 @@
 	</bean>
 	<!-- hibernate jpa -->
 	<bean class="org.springframework.orm.jpa.JpaTransactionManager"
-		id="transactionManager">
+		  id="transactionManager">
 		<property name="entityManagerFactory" ref="entityManagerFactory" />
 	</bean>
 	<tx:annotation-driven transaction-manager="transactionManager" />
 
 	<bean id="transactionInterceptor"
-		class="org.springframework.transaction.interceptor.TransactionInterceptor">
+		  class="org.springframework.transaction.interceptor.TransactionInterceptor">
 		<property name="transactionManager" ref="transactionManager" />
 		<property name="transactionAttributeSource">
 			<bean
-				class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"></bean>
+					class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"></bean>
 		</property>
 	</bean>
 
 	<bean id="transactionAttributeSourceAdvisor"
-		class="org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor">
+		  class="org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor">
 		<property name="transactionInterceptor" ref="transactionInterceptor" />
 	</bean>
 
 	<bean id="entityManagerFactory"
-		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+		  class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
 		<property name="persistenceUnitName" value="persistenceUnit" />
 		<property name="persistenceXmlLocation" value="classpath*:META-INF/persistence.xml"/>
 		<property name="packagesToScan" value="com.uas.platform" />
@@ -155,7 +155,7 @@
 		<property name="cacheManager" ref="ehcache"></property>
 	</bean>
 	<bean id="ehcache"
-		class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
+		  class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
 		<property name="configLocation" value="classpath:spring/ehcache.xml"></property>
 		<property name="shared" value="true"></property>
 	</bean>
@@ -179,7 +179,7 @@
 		<property name="from" value="${email.from}" />
 	</bean>
 	<bean id="velocityEngine"
-		class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
+		  class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
 		<property name="velocityProperties">
 			<props>
 				<prop key="resource.loader">class</prop>
@@ -192,13 +192,13 @@
 	</bean>
 	<!-- 文件上传 -->
 	<bean id="multipartResolver"
-		class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
+		  class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
 		<property name="defaultEncoding" value="utf-8"></property>
 	</bean>
 	<!-- 账户中心配置 -->
 	<bean id="accountConfigurer" class="com.uas.sso.web.AccountConfigurer"
-		init-method="init">
-		<property name="configPath" value="classpath:dev/account.properties" />
+		  init-method="init">
+		<property name="configPath" value="classpath:${profile}/account.properties" />
 	</bean>
 
 	<import resource="classpath:spring/ehcache.xml"/>