错误信息:
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.
出错的原因:
MySQL server 的时区和本地时区不符合
解决方法:
在连接数据库的url后面加上serverTimezone=GMT%2B8
eg:
jdbc:mysql://localhost:3306/database?
变为:
jdbc:mysql://localhost:3306/database?serverTimezone=GMT%2B8