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

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配置

  jdbc.driverClass = com.mysql.dbc.Driver
  jdbc.url = jdbc:mysql://127.0.0.1:3306/test?useSSL=false&useUnicode=true&characterEncoding=utf-8
  jdbc.username = root
  jdbc.password = root

  升级后按照最新官方提示支持将com.mysql.jdbc.Driver  改为  com.mysql.cj.jdbc.Driver

  jdbc.driverClass = com.mysql.cj.jdbc.Driver

  jdbc.url = jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = GMT(这个链接方式也要改变)
  jdbc.username = root
  jdbc.password = root
 

原文地址:https://www.cnblogs.com/qinxu/p/10690860.html