日期:2014-05-16  浏览次数:20454 次

spring dbcp典型配置
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> 
	 <property name="driverClassName" value="com.mysql.jdbc.Driver" />
	 <property name="url" value="xxxx" />
	 <property name="username"><value>xxxx</value></property>
        <property name="password"><value>xxxxx</value></property>
        <property name="maxActive"><value>20</value></property>
        <property name="initialSize"><value>1</value></property>
        <property name="maxWait"><value>60000</value></property>
        <property name="maxIdle"><value>20</value></property>
        <property name="minIdle"><value>3</value></property>
        <property name="removeAbandoned"><value>true</value></property>
        <property name="removeAbandonedTimeout"><value>180</value></property>
        <property name="connectionProperties"><value>clientEncoding=GBK</value></property>
</bean>