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

Posted dxmcu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决:Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj(相关的知识,希望对你有一定的参考价值。

异常:

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

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

application-dev.properties

spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=123456
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=123456
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(的主要内容,如果未能解决你的问题,请参考以下文章

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

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

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

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

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

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