springJPA出错
程序员文章站
2022-04-25 16:29:35
...
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 if you want to utilize time zone support.
翻译:SQLException:服务器时区值无法识别或表示多个时区。如果要利用时区支持,必须配置服务器或JDBC驱动程序(通过“serverTimezone”配置属性)以使用更具体的时区值。
解决办法:
url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
在application.yml的url后加上这一串
推荐阅读