idea创建spring-boot出现[ERROR] java.sql.SQLException: The server time zone value ‘�й���ʱ��’ is
unrecognized or represents more than one time zone.
You must configure either the server or JDBC driver (via the
serverTimezone configuration property) to use a more
specifc time zone value
解决办法:
在mysql的连接上加上服务器时区:serverTimezone=UTC
例如 本人的 url:
jdbc:mysql://localhost:3306/xxxxx?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
类似的问题有三个 都发到我的博客上了。看着类似,其实是三个不一样的问题 查询时干扰的我搞了好久。所以我分开写了,希望能帮到各位。