qq_奥古斯都_1
2018-07-20 14:55
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 [C:\Users\菲菲\IdeaProjects\test\target\classes\mapper\AreaDao.xml]
### The error may involve com.example.test.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.driverClass = com.mysql.cj.jdbc.Driver
jdbc.url = jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT
你可以先看看你的数据库url配置是否少了数据库名
或者你的配置缺少了什么,比如空格,单词,或者末尾是不是多了个空格
如果你的数据库是mysql-connector-java 6.0.x版本,driver是com.mysql.cj.jdbc.Driver
SpringBoot+MyBatis搭建迷你小程序
91497 学习 · 621 问题
相似问题