hz-zhhq-app-service/uap/WebContent/WEB-INF/configuration/datasource.xml

38 lines
1.9 KiB
XML

<?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:module="http://www.sgcc.com.cn/schema/platform/module"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.sgcc.com.cn/schema/platform/module http://www.sgcc.com.cn/schema/platform/module/module.xsd">
<module:service id="dataSourceService" beanId="dataSource"
targetName="javax.sql.DataSource" />
<bean id="dataSource" name="dataSource"
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<!-- 测试 -->
<!-- <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property name="url" value="jdbc:oracle:thin:@//localhost:1521/ORCL" />
<property name="username" value="ORACLE" />
<property name="password" value="Love@0802" /> -->
<!-- 生产 -->
<property name="driverClassName" value="sgcc.nds.jdbc.driver.NdsDriver"/>
<property name="url"
value="jdbc:nds://172.16.200.204:18700,172.16.200.205:18700/v_zhhq?appname=App_zhhq" />
<property name="username" value="zhhq_hz" />
<property name="password" value="zhhq_2022!" />
<property name="maxActive" value="500" />
<property name="maxIdle" value="30" />
<property name="maxWait" value="5000" />
<property name="validationQuery" value="SELECT 1 from dual" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="false" />
<property name="timeBetweenEvictionRunsMillis" value="30000" />
<property name="minEvictableIdleTimeMillis" value="1800000" />
<property name="defaultAutoCommit" value="true" />
<property name="removeAbandoned" value="true" />
<property name="removeAbandonedTimeout" value="60" />
<property name="logAbandoned" value="true" />
</bean>
</beans>