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驱动类,Driver位置由com.mysql.jdbc.Driver 变为com.mysql.cj.jdbc.Driver
解决方案:
将数据配置文件里spring.datasource.driver-class-name=com.mysql.jdbc.Driver修改为如下
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver