Commit 051a2a5a by xioa

修改连接池

parent 4fd3bd02
......@@ -68,6 +68,11 @@
<io.username>root</io.username>
<io.password>reyun123</io.password>
<etl.url>jdbc:mysql://172.31.21.91:3306/tkio_stream?characterEncoding=utf-8
</etl.url>
<etl.username>trackingio_rpt</etl.username>
<etl.password>trackingio_rpt</etl.password>
<qcloudatasource.url>
jdbc:mysql://10.3.20.32:3306/trackingio_test?characterEncoding=utf-8
</qcloudatasource.url>
......@@ -231,6 +236,12 @@
<io.username>reyun</io.username>
<io.password>Reyun123</io.password>
<etl.url>
jdbc:mysql://etl.cma5jkozme68.rds.cn-north-1.amazonaws.com.cn:3306/tkio?characterEncoding=utf-8
</etl.url>
<etl.username>trackingio_rpt</etl.username>
<etl.password>trackingio_rpt</etl.password>
<qcloudatasource.url>
jdbc:mysql://172.28.16.22:3306/trackingio?characterEncoding=utf-8
</qcloudatasource.url>
......
......@@ -27,12 +27,7 @@
<context:property-placeholder location="classpath:persistence.properties,classpath:redis.properties"/>
<bean id="tikoDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${dataSource.driverClassName}"></property>
<property name="jdbcUrl" value="${etl.dataSource.url}"></property>
<property name="user" value="${etl.dataSource.username}"></property>
<property name="password" value="${etl.dataSource.password}"></property>
</bean>
<!-- 将连接池注入 jdbcTemplate -->
<bean id="tikoTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
......@@ -73,6 +68,12 @@
<property name="minEvictableIdleTimeMillis" value="300000"/>
</bean>
<bean id="tikoDataSource" parent="parentDataSource">
<property name="url" value="${etl.dataSource.url}"></property>
<property name="username" value="${etl.dataSource.username}"></property>
<property name="password" value="${etl.dataSource.password}"></property>
</bean>
<bean id="dataSource" parent="parentDataSource">
<property name="url" value="${default.dataSource.url}"/>
<property name="username" value="${default.dataSource.username}"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment