java代码启动正常访问报错CannotGetJdbcConnectionException

未结 分享 0 5211
六月
六月 2021-06-28 17:48:41
悬赏:0 收藏
报错提示: [pre] Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: com.mysql.jdbc.Driver [/pre] 当前环境pom已添加 [pre] mysql.connector.java 8.0.18 [/pre] properties配置文件下yml中可以不用&转义 datasource.url = jdbc:mysql://127.0.0.1:3306/xx?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false 查看当前jar是否已经加载了mysql8.0.18 此时发现没有加载jar包 img[http://oss.xxpay.vip/img/5d077f47-389a-47be-be45-3ff3df09d49c6439998133590461720.jpg] 打开Maven,点击刷新pom,更新包库 img[http://oss.xxpay.vip/img/9fcf477c-2da8-419e-965d-eeb90abae3951510549256831370761.jpg] 现在已经有jar包了,再次运行访问,通过。 img[http://oss.xxpay.vip/img/133a93c7-692b-414a-8d53-810c8873465c8098413802536566652.jpg]
本周热议

冀ICP备19034523号-6
Copyright © 2017 - 2024 Jeequan. All Rights Reserved. 计全科技 版权所有