您的位置:首页 > 编程语言 > Java开发

java连接mysql使用 ssh

2014-02-27 17:15 357 查看
tomcat context部分

<Resource name="jdbc/数据库名称"
type="javax.sql.DataSource"
username="root"
password="root"
driverClassName="com.mysql.jdbc.Driver"
maxIdle="30"
url="jdbc:mysql://127.0.0.1:3306/数据库名称"
maxActive="500"/>

web.xml部分

<resource-ref>
<res-ref-name>jdbc/数据库名称</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

其他部分一样
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: