Loading class `com.mysql.jdbc.Driver‘. This is deprecated.解决方法

Posted 一切因为是码农

tags:

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

警告信息:

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


提示信息表明:
数据库驱动com.mysql.jdbc.Driver已经被弃用了、应当使用新的驱动com.mysql.cj.jdbc.Driver

所以,按照提示更改jdbc.properties配置 com.mysql.jdbc.Driver 改为 com.mysql.cj.jdbc.Driver


解决方法:

1、在Spring配置文件种查看德鲁伊连接池配置

将红框所圈值改为:com.mysql.cj.jdbc.Driver

2、重新执行查看控制台

警告解除。

以上是关于Loading class `com.mysql.jdbc.Driver‘. This is deprecated.解决方法的主要内容,如果未能解决你的问题,请参考以下文章

解决: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.cj

mysql 问题 Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is