栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

nested exception is org.apache.ibatis.exceptions.PersistenceException:

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

nested exception is org.apache.ibatis.exceptions.PersistenceException:

问题:

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 com/ssmbuild/dao/BookMapper.xml
### The error may involve com.ssmbuild.dao.BookMapper.queryAllBook
### 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!

解决:

尝试了很多方法,最后还是url的问题:

原有的:

jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/ssmbuilduseSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=CST
jdbc.username=root
jdbc.password=***

现在的:

jdbc.url=jdbc:mysql://localhost:3306/ssmbuild?characterEncoding=utf-8&serverTimezone=GMT

就可以连接成功啦

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/658770.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号