zoukankan      html  css  js  c++  java
  • web.xml 中 resource-ref 的注意事项

     配置说明:

    web.xml 中配置

    <resource-ref>
      <description>Employees Database for HR Applications</description>
      <res-ref-name>jdbc/EmployeeDB</res-ref-name>
      <res-ref-type>javax.sql.DataSource</res-ref-type>
      <res-auth>Container</res-auth>
    </resource-ref>
    

     

    res-ref-name/
    res-env-ref-name

    资源的名称,相对于java:comp/env context

      

    对应的jabc连接池配置文件:

    tomcatconfCatalinalocalhostemployer.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <Context docBase="E:	omcatwebapps	est" path="/test" reloadable="true">
    	<Resource name="jdbc/EmployeeDB"
    	auth="Container"
    	type="javax.sql.DataSource"
    	maxActive="1000"
    	maxIdle="30"
    	maxWait="100"
    	username="root"
    	password="root"
    	driverClassName="com.mysql.jdbc.Driver"
    	url="jdbc:mysql://localhost:3306/test?useUnicode=true"/>
    </Context>
    

      

  • 相关阅读:
    Java attack
    Java attack
    Java attack
    Java attack
    Java attack
    Java attack -Java 中的集合
    Java attack
    迟到的《Cashflow》游戏感悟
    三读《富爸爸穷爸爸》
    安装vue开发环境→安装淘宝镜像的时候报错
  • 原文地址:https://www.cnblogs.com/estellez/p/5017000.html
Copyright © 2011-2022 走看看