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>
    

      

  • 相关阅读:
    word 操作技巧
    有朝一日
    菜狗日记2021.7.10
    记一次JSON.toJSONString()踩坑
    菜狗日记2020.11.13
    菜狗日记2020.11.6
    菜狗日记2020.11.03
    菜狗日记2020.10.29
    菜狗日记2020.10.17
    菜狗日记2020.10.11
  • 原文地址:https://www.cnblogs.com/estellez/p/5017000.html
Copyright © 2011-2022 走看看