[mysql spring] Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver’.[解决方案]

今天爱分享给大家带来[mysql spring] Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver’.[解决方案],希望能够帮助到大家。

驱动版本问题
运行spring项目报类似这样的错误:Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver’.

[mysql spring] Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver’.[解决方案]插图

上面这串英文翻译过来就是解决方案:把com.mysql.jdbc.Driver替换成com.mysql.cj.jdbc.Driver

com.mysql.jdbc.Driver 是 mysql-connector-java 5中的,
com.mysql.cj.jdbc.Driver 是 mysql-connector-java 6中的。
所用它两具体用谁,看你的依赖用的哪个版本

[mysql spring] Loading class `com.mysql.jdbc.Driver’. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver’.[解决方案]插图(1)

人已赞赏
Java数据库

[mysql spring]The server time zone value ‘???’ is unrecognized or represents more than one time zone. 【解决方案】

2020-10-27 17:22:11

Java

2020 spring 日志配置logging.file 注意事项

2020-10-27 17:35:24

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧