服务启动时会有时区的问题,可以加上时区,避免报错,这里需要加上时区:spring.datasource.url = jdbc:mysql://localhost:3306/mq_basic?useUnicode=true&characterEncoding=utf8&useSSL=false 这里没有加上时区