自己搭建Springboot 项目时报出了这样的错:

idea 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.

很明显这个错误是和数据库连接驱动有关,但是这个 com.mysql.jdbc.Driver 驱动配置是之前一直用的,而这次我用的是 MySQL 8 版本的,特地查了一下,原来MySQL高版本的驱动发生了改变,需要使用 com.mysql.cj.jdbc.Driver ,将驱动配置换成新的后问题就消失了;