Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdb
异常错误:
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驱动的时候是com.mysql.jdbc.Driver, 但是由于我maven项目mysql驱动版本比较高, 所以出现了这个问题,
解决方案:
改成这个:com.mysql.cj.jdbc.Driver