Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiat

异常提示

Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiat_第1张图片

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.

Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiation.

方案

Registered driver with driverClassName=com.mysql.jdbc.Driver was not found, trying direct instantiat_第2张图片

参考

Loading class com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is com.mysql.cj.jdb
JDBC连接数据库出现Loading class `com.mysql.jdbc.Driver’. This is deprecated.问题的相关解决方法

你可能感兴趣的:(常见问题,mysql,数据库)