配置JNDI

打开tomcat目录找到conf文件夹打开找到context.xml

然后在里面添加   

 <Resource name="jndi.smbms" auth="Container" type="javax.sql.DataSource"
     maxActive="100" maxIdle="30"
     driverClassName="com.mysql.jdbc.Driver"
     user="root"
     password="root"
     url="jdbc:mysql://localhost:3306/smbms?useUnicode=true&characterEncoding=utf-8"/>

  

猜你喜欢

转载自www.cnblogs.com/XingPeng/p/10617368.html