<bean id=dataSource class=monsdbcpBasicDataSource destroymethod=close>
<property name=driverClassName value=commysqljdbcDriver/>
<property name=url value=jdbc:mysql://localhost:/news/>
<property name=username value=root/>
<property name=password value=/>
<property name=maxActive value=/>
<property name=maxIdle value=/>
<property name=initialSize value=/>
<property name=maxWait value=/>
<property name=defaultAutoCommit value=true/>
<property name=removeAbandoned value=true/>
<property name=removeAbandonedTimeout value=/>
<property name=logAbandoned value=true/>
bean>
//注意
在spring中配置DHCP數據源時必須加入DHCP的個基本包在Tomcat的Common/lib目錄下可以找到這個包
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28116.html