使用的mysql时,配置数据库驱动的时候报了一个这样的错:
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.
通过异常信息以及网上的解释,其实就是驱动配置的不符合,
1.Maven下的版本过高,把相关的包降级,
2.可以把com.mysql.jdbc.Driver 换成 com.mysql.cj.jdbc.Driver。
标签:jdbc,driver,deprecated,MySQL,Driver,mysql,com,class From: https://blog.51cto.com/u_12131813/6002830