首页 新闻 会员 周边 捐助

java mybatis c3p0 遇到的问题,不知道是配置的出错还是怎么滴。大神看下。

0
悬赏园豆:10 [已解决问题] 解决于 2018-10-13 13:35

连接 mysql 报这个错误: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! ### The error may exist in file [D:\solutions.java\springDemo\target\springDemo\WEB-INF\classes\mapper\UserDaoMapper.xml] ### The error may involve dao.UserDao.selectByUsername ### The error occurred while executing a query ### 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!
怎么回事啊?

Eysa的主页 Eysa | 初学一级 | 园豆:62
提问于:2018-10-12 15:37
< >
分享
最佳答案
0

原来是时区没指定。谢谢啦。

Eysa | 初学一级 |园豆:62 | 2018-10-13 13:34
其他回答(1)
0

数据库连接看一下

收获园豆:10
java之途 | 园豆:212 (菜鸟二级) | 2018-10-12 18:37

支持(0) 反对(0) Eysa | 园豆:62 (初学一级) | 2018-10-13 08:23

我是.net,现在要转java还希望多多关照啊。

支持(0) 反对(0) Eysa | 园豆:62 (初学一级) | 2018-10-13 08:26

mysql 是 8.0

支持(0) 反对(0) Eysa | 园豆:62 (初学一级) | 2018-10-13 08:27
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册