问题:Connections could not be acquired from the underlying database!
1、无法从底层数据库获取连接
1.1、首先日常打开自己的项目,运行,噢,一直在打转,好的,找错找了几个小时,还是不会找错,嗨呀。
2、依旧,看到某大佬的提醒,发现自己的sqlServer数据库才安装;和之前的登陆名和密码不一样;之前一直报的错误是:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
3、才知道查找问题应该看最后一句话,也就是:Connections could not be acquired from the underlying database!
4、查看修改自己sqlserver数据库的登录名和密码,参考这位大佬
可怕,然后自己修改了jdbc的配置文件登陆名和密码
5、是的,原来是user1登录,和user1的密码
解决,注意自己的spring-context-dao.xml文件中数据库连接池的书写
少年还是太年轻,写给自己的随笔,有问题欢迎指出