在tomcat的context.xml文件中添加
auth="Container"
type="javax.sql.DataSource"
maxActive="100"
maxIdle="30"
maxWait="100"
username="user"
password="123456"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://127.0.0.1:3306/test1" />启动tomcat就一直报这个错误
确定数据库连接路径、密码正确后,还可能跟驱动有关,tomcat 的 lib 目录下是否添加了 jdbc 驱动包呢?
具体报什么错误?是不是数据库服务没有启动或者test1库不存在