12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?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"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-2.5.xsd">
- <bean id="clis"
- class="org.springframework.jdbc.datasource.DriverManagerDataSource">
- <property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="url" value="jdbc:mysql://localhost:3306/clis" />
- <property name="username" value="root" />
- <property name="password" value="root" />
- </bean>
-
- <!-- 享佳订单系统 -->
- <bean id="xiangjiadb" class="com.mchange.v2.c3p0.ComboPooledDataSource"
- destroy-method="close">
- <property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
- <property name="user" value="sa" />
- <property name="password" value="sa_2013" />
- <property name="jdbcUrl" value="jdbc:sqlserver://BEHO-157:1433;databasename=edi_db" />
- <property name="initialPoolSize" value="10" />
- <property name="maxIdleTime" value="30" />
- <property name="maxPoolSize" value="100" />
- <property name="minPoolSize" value="10" />
- </bean>
-
- <!-- DPS系统 -->
- <bean id="xiangjiadps" class="com.mchange.v2.c3p0.ComboPooledDataSource"
- destroy-method="close">
- <property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
- <property name="user" value="root" />
- <property name="password" value="root" />
- <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/dps?characterEncoding=utf8" />
- <property name="initialPoolSize" value="10" />
- <property name="maxIdleTime" value="30" />
- <property name="maxPoolSize" value="100" />
- <property name="minPoolSize" value="10" />
- </bean>
- <!-- 编写spring 配置文件的配置多数源映射关系 -->
- <bean class="com.behosoft.edi.middledb.common.DynamicDataSource" id="dataSource1">
- <property name="targetDataSources">
- <map key-type="java.lang.String">
- <entry value-ref="clis" key="EbhLis"></entry>
- <entry value-ref="xiangjiadb" key="xiangjia"></entry>
- <entry value-ref="xiangjiadps" key="xiangjiadps"></entry>
- </map>
- </property>
- <property name="defaultTargetDataSource" ref="xiangjiadb">
- </property>
- </bean>
- <bean id="simpleJdbcTemplate" class="org.springframework.jdbc.core.simple.SimpleJdbcTemplate"><!--datasource自已配的 -->
- <constructor-arg ref="dataSource1" />
- </bean>
-
-
- </beans>
|