标签:xml文件 jdbc col 使用 contex 文件中 localhost text nbsp
Tomcat服务器的context.xml文件中Context元素下增加Resource元素
oracle
<Resource name="jdbc/hrs" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="20" maxWait="30000" username="hr" password="hr" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:orcl" />
mysql
<Resource name="jdbc/test" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="20" maxWait="30000" username="root" password="root" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/test" removeAbandoned="true" removeAbandonedTimeout="30" />
标签:xml文件 jdbc col 使用 contex 文件中 localhost text nbsp
原文地址:https://www.cnblogs.com/whirlwind/p/9940869.html