server.xml下<GlobalNamingResources>

<Resource name="jdbc/Huobanplus"
                  auth="Container"
                  type="javax.sql.DataSource"
                  username="dbuser"
                  password="ddbbuusseerr"
                  driverClassName="com.mysql.jdbc.Driver"
                  url="jdbc:mysql://localhost:3307/huobanplusstg?useUnicode=true&amp;characterEncoding=UTF8"
                  maxTotal="8"
                  maxIdle="4"/>

 

context.xml

<ResourceLink name="jdbc/hotsupplier"
                            global="jdbc/hotsupplier"
                            type="javax.sql.DataSource"/>