123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <?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:jaxws="http://cxf.apache.org/jaxws"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://cxf.apache.org/jaxws
- http://cxf.apache.org/schemas/jaxws.xsd">
- <!-- spring jdbc 连接池数据源,可以用tomcat的jndi替换 -->
- <!-- 原来标准版数据源mysql-->
- <!--
- <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" scope="singleton" destroy-method="close">
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://192.168.1.80:3306/na_temp?useUnicode=true&characterEncoding=UTF8"/>
- <property name="username" value="root"/>
- <property name="password" value="root"/>
- <property name="maxWait" value="3000"/>
- <property name="maxIdle" value="30"/>
- <property name="maxActive" value="100"/>
- <property name="removeAbandoned" value="true"/>
- <property name="removeAbandonedTimeout" value="60"/>
- <property name="logAbandoned" value="false"/>
- </bean>
- -->
- <!-- -->
-
- <bean id="dataSourceMYSQL"
- class="org.apache.commons.dbcp.BasicDataSource" scope="singleton" >
- <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
- <property name="url" value="jdbc:mysql://192.168.1.210:3306/lvyuan?useUnicode=true&characterEncoding=UTF8"/>
- <property name="username" value="root"/>
- <property name="password" value="root"/>
- <property name="maxWait" value="3000"/>
- <property name="maxIdle" value="30"/>
- <property name="maxActive" value="100"/>
- <property name="removeAbandoned" value="true"/>
- <property name="removeAbandonedTimeout" value="60"/>
- <property name="logAbandoned" value="false"/>
- </bean>
-
- <bean id="dataSource"
- class="org.apache.commons.dbcp.BasicDataSource" scope="singleton" >
- <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
- <property name="url" value="jdbc:oracle:thin:@192.168.1.121:1521:orcl"/>
- <property name="username" value="trs"/>
- <property name="password" value="trs123"/>
- <property name="maxWait" value="3000"/>
- <property name="maxIdle" value="30"/>
- <property name="maxActive" value="100"/>
- <property name="removeAbandoned" value="true"/>
- <property name="removeAbandonedTimeout" value="60"/>
- <property name="logAbandoned" value="false"/>
- </bean>
- <bean id="dataSourceSQL"
- class="org.apache.commons.dbcp.BasicDataSource" scope="singleton" >
- <property name="driverClassName" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
- <property name="url" value="jdbc:sqlserver://10.10.12.5:1433;DatabaseName=SQL_Data"/>
- <property name="username" value="sa"/>
- <property name="password" value="nsos"/>
- <property name="maxWait" value="3000"/>
- <property name="maxIdle" value="30"/>
- <property name="maxActive" value="100"/>
- <property name="removeAbandoned" value="true"/>
- <property name="removeAbandonedTimeout" value="60"/>
- <property name="logAbandoned" value="false"/>
- </bean>
- <!-- spring 事务管理 -->
- <bean id="transactionManager"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource">
- <ref bean="dataSource"/>
- </property>
- </bean>
- <bean id="txProxyTemplate" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
- <property name="transactionManager" ref="transactionManager"></property>
- <property name="transactionAttributes">
- <props>
- <prop key="insert*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="update*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="delete*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="generate*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="query*">PROPAGATION_REQUIRED</prop>
- <prop key="count*">PROPAGATION_REQUIRED,readOnly</prop>
- <prop key="*">PROPAGATION_REQUIRED</prop>
- </props>
- </property>
- </bean>
- <bean id="transactionManagerSQL"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource">
- <ref bean="dataSourceSQL"/>
- </property>
- </bean>
- <bean id="transactionManagerMYSQL"
- class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource">
- <ref bean="dataSourceMYSQL"/>
- </property>
- </bean>
- <bean id="txProxyTemplateSQL" abstract="true" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
- <property name="transactionManagerSQL" ref="transactionManagerSQL"></property>
- <property name="transactionAttributes">
- <props>
- <prop key="insert*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="update*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="delete*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="generate*">PROPAGATION_REQUIRED,-Exception</prop>
- <prop key="query*">PROPAGATION_REQUIRED,readOnly</prop>
- <prop key="count*">PROPAGATION_REQUIRED,readOnly</prop>
- <prop key="*">PROPAGATION_REQUIRED</prop>
- </props>
- </property>
- </bean>
- <!-- 加载spring jdbc dao 模板 -->
- <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource">
- <ref bean="dataSource"/>
- </property>
- </bean>
- <bean id="jdbcTemplateSQL" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource">
- <ref bean="dataSourceSQL"/>
- </property>
- </bean>
- <bean id="jdbcTemplateMySQL" class="org.springframework.jdbc.core.JdbcTemplate">
- <property name="dataSource">
- <ref bean="dataSourceMYSQL"/>
- </property>
- </bean>
- <!-- 公共功能 -->
- <import resource="/classes/com/sooka/common/config/applicationContext_common.xml" />
- <import resource="/classes/com/sooka/generate/config/applicationContext_generate.xml" />
- <!-- 例子 -->
- <import resource="/classes/com/sooka/nsos/system/login/config/applicationContext_login.xml" />
- <import resource="/classes/com/sooka/nsos/system/organization/config/applicationContext_dept.xml" />
- <import resource="/classes/com/sooka/nsos/system/employee/config/applicationContext_employee.xml" />
- <import resource="/classes/com/sooka/nsos/system/module/config/applicationContext_Module.xml" />
- <import resource="/classes/com/sooka/nsos/system/role/config/applicationContext_Role.xml"/>
- <import resource="/classes/com/sooka/nsos/system/permissions/config/applicationContext_Permissions.xml"/>
- <!-- jquery case -->
- <import resource="/classes/com/sooka/nsos/jcase/config/applicationContext_JCase.xml"/>
- <!-- dtree case -->
- <import resource="/classes/com/sooka/nsos/org/config/applicationContext_org.xml" />
- <!-- fileUpLoad case -->
- <import resource="/classes/com/sooka/nsos/fileUpload/config/applicationContext_fileUpload.xml" />
- <!-- trsdata -->
- <import resource="/classes/com/sooka/app_trsdata/trsdata/config/applicationContext_trsdata.xml" />
- <!-- login -->
- <import resource="/classes/com/sooka/app_trsdata/login/config/applicationContext_login.xml" />
- <!-- 办事服务接口 -->
- <import resource="/classes/com/sooka/bsfw/config/applicationContext_bsfw.xml" />
- </beans>
|