**
背景
**
项目使用的是springboot集成mysql,项目正常启动是不会报错的,当请求接口时报错如下:
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
datasource.url=jdbc:mysql://localhost:3306/miao?
useUnicode=true&characterEncoding=utf-
8&allowMultiQueries=true&useSSL=false&serverTimezone=UTC