1.修改pom.xml
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<!-- 对应 : maven的jar包中mysql的版本配置为8.0.11 -->
<version>8.0.11</version>
</dependency>
2.修改application.properties对应的数据库部分
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/harvest?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true