The server time zone value '�й���׼ʱ��' is unrecognized or represents more than one time zone

 

springboot运行报错,错误信息如下:

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 specific time zone value if you want to utilize time zone support.

 原因是springboot在新版本后需要更改时区,需要在连接数据的地方加上时区就OK

    url: jdbc:mysql://localhost:3306/DB_Name?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8

  

 

posted @ 2021-02-18 16:59  大大大怪兽  阅读(69)  评论(0编辑  收藏  举报