無法獲取數(shù)據(jù)庫連接
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!
2018-11-18
jdbc.driverClass? ?= com.mysql.cj.jdbc.Driver
jdbc.url? ? ? = jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT
2018-09-05
你可以先看看你的數(shù)據(jù)庫url配置是否少了數(shù)據(jù)庫名
或者你的配置缺少了什么,比如空格,單詞,或者末尾是不是多了個(gè)空格
如果你的數(shù)據(jù)庫是mysql-connector-java 6.0.x版本,driver是com.mysql.cj.jdbc.Driver