java配置数据库连接池以mysql和sqlserver为例
配置tomcat下面的content.xml
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/com?useUnicode=true&characterEncoding=UTF-8"
username="root"
password="root"
maxActive="100"
maxIdle="2"
maxWait="10000" />
removeAbandoned
true
removeAbandonedTimeout
60
logAbandoned
true
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=fashion"
username="sa"
password