当前位置:   article > 正文

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

oading class `com.mysql.jdbc.driver'. this is deprecated. the new driver cla

异常错误: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.

 

这个问题 是在我整合项目过程中出现的,用了最新的mysql 连接驱动

以前版本的jdbc.properties

 

  1. jdbc.driverClass = com.mysql.dbc.Driver
  2. jdbc.url = jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT
  3. jdbc.username = root
  4. jdbc.password = root123

 

 

 

现在按照最新官方提示支持将com.mysql.jdbc.Driver  改为  com.mysql.cj.jdbc.Driver

 

  1. jdbc.driverClass = com.mysql.cj.jdbc.Driver
  2. jdbc.url = jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT
  3. jdbc.username = root
  4. jdbc.password = root123

如上情况不能解决君的问题,请耐心自行搜索解决!同时也希望此贴能够帮助各位!

 

 

 

 

 

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号