在连接字符串增加serverTimezone定义就可以了。
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/xxl_job?Unicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2b8
The server time zone value 'unknown' is unrecognized or represents more than one time zone
最新推荐文章于 2023-11-19 16:38:04 发布
本文介绍如何在Spring Boot项目中正确配置MySQL数据库连接的时区,避免因时区问题导致的数据不一致。通过在URL参数中增加serverTimezone定义,可以确保应用程序与数据库之间的时区同步。
366

被折叠的 条评论
为什么被折叠?



