<?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:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- 1.使用:阿里巴巴的Druid配置数据库连接池 -->
<bean name="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
init-method="init" destroy-method="close">
<property name="username" value="${oracle.username}"></property>
<property name="password" value="${oracle.password}"></property>
<property name="url" value="${oracle.url}"></property>
<property name="initialSize" value="${druid.initialSize}"></property>
<property name="minIdle" value="${druid.minIdle}"></property>
<property name="maxActive" value="${druid.maxActive}"></property>
<property name="maxWait" value="${druid.maxWait}"></property>
<property name="timeBetweenEvictionRunsMillis" value="${druid.timeBetweenEvictionRunsMillis}"></property>
<property name="minEvictableIdleTimeMillis" value="${druid.minEvictableIdleTimeMillis}"></property>
<property name="poolPreparedStatements" value="${druid.poolPreparedStatements}"></property>
<property name="maxPoolPreparedStatementPerConnectionSize"
value="${druid.maxPoolPreparedStatementPerConnectionSize}"></property>
<property name="validationQuery" value="${druid.validationQuery}"></property>
</bean>
</beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- 1.使用:阿里巴巴的Druid配置数据库连接池 -->
<bean name="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
init-method="init" destroy-method="close">
<property name="username" value="${oracle.username}"></property>
<property name="password" value="${oracle.password}"></property>
<property name="url" value="${oracle.url}"></property>
<property name="initialSize" value="${druid.initialSize}"></property>
<property name="minIdle" value="${druid.minIdle}"></property>
<property name="maxActive" value="${druid.maxActive}"></property>
<property name="maxWait" value="${druid.maxWait}"></property>
<property name="timeBetweenEvictionRunsMillis" value="${druid.timeBetweenEvictionRunsMillis}"></property>
<property name="minEvictableIdleTimeMillis" value="${druid.minEvictableIdleTimeMillis}"></property>
<property name="poolPreparedStatements" value="${druid.poolPreparedStatements}"></property>
<property name="maxPoolPreparedStatementPerConnectionSize"
value="${druid.maxPoolPreparedStatementPerConnectionSize}"></property>
<property name="validationQuery" value="${druid.validationQuery}"></property>
</bean>
</beans>