首页 > 编程语言 > 详细

java报错

时间:2021-02-03 14:00:19      阅读:27      评论:0      收藏:0      [点我收藏+]
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
 
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user ‘woshin‘@‘localhost‘ (using password: YES))
 
### The error may exist in ssm/mapper/ItemsMapper.xml
 
### The error may involve ssm.mapper.ItemsMapper.selectByPrimaryKey
 
### The error occurred while executing a query
 
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested
 
 
需要查看pom.xml db.properties
尝试做如下修改:
1版本问题,尝试修改版本 8.0.15
 
    mysql
    mysql-connector-java
    8.0.15
 
2.更改db.properties
jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/mydb?rewriteBatchedStatements=true&useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&useSSL=false
jdbc.username=root
jdbc.password=123456
?
备注:记得路径问题

java报错

原文:https://www.cnblogs.com/krifs/p/14366231.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!