springcloud项目在登录时,报错,详细错误信息如下:
2022-06-10 21:55:12.378 WARN 18248 --- [nio-9999-exec-1] o.s.s.o.provider.endpoint.TokenEndpoint : Handling error: InternalAuthenticationServiceException, Failed to obtain JDBC Connection; nested exception is 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.
解决方法:
url: jdbc:mysql://mysql-server:3306/coin-exchange?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC
或者:
..........&serverTimezone=Asia/Shanghai
也是可以的。