千层酥油饼
2018-12-27 17:28
nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database 碰到这个问题的同学,可以试试:
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.44</version> </dependency>
加上版本号就可以了
我的是版本太新了 ,默认是
2.1.2.RELEASE 改为2.0.2.RELEASE 就好了
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> <relativePath /> <!-- lookup parent from repository --> </parent>
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
### The error may exist in file [E:\ideaworkspace\demo\target\classes\mapper\AreaDao.xml]
### The error may involve com.imooc.demo.dao.AreaDao.queryArea
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
改了也没有用啊,这个问题卡了好久,网上还说改jdbc.driver=com.mysql.jdbc.Driver,然后还是这个问题
已解决。
SpringBoot+MyBatis搭建迷你小程序
92306 学习 · 657 问题
相似问题