在启动启动类后,在控制台报如下错误:
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.
在yml配置文件中修改数据库连接数据:
原为:
driver-class-name: com.mysql.jdbc.Driver
修改为:
driver-class-name: com.mysql.cj.jdbc.Driver
修改完重启后即不报错