这是由于mysql报了时区的错误
修改很简单,如下:
spring:
datasource:
url: jdbc:mysql://localhost:3306/springboot_cache?serverTimezone=UTC
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
initialization-mode: always
在url最后边加上?serverTimezone=UTC即可解决问题