-
idea连接mysql报错没有设置serverTimezone
Advanced目录下设置上面的属性,值设置为Asia/Shanghai -
springboot启动报错
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.
在yaml配置文件中设置
url: jdbc:mysql:///数据库名?serverTimezone=Asia/Shanghai
- .xml中的&号
&
不只是&,还有><等一些符号都需要转义