码迷,mamicode.com
首页 > 数据库 > 详细

解决Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.

时间:2019-12-30 23:34:46      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:cal   nbsp   local   name   time   sql   drive   连接   oca   

异常:

Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver‘. 

整合spring boot项目过程中出现的,用了最新的mysql 连接驱动

application-dev.properties

spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

需要将 com.mysql.jdbc.Driver  改为  com.mysql.cj.jdbc.Driver

spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

 

解决Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.

标签:cal   nbsp   local   name   time   sql   drive   连接   oca   

原文地址:https://www.cnblogs.com/longronglang/p/12121925.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!