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.
如果要利用时区支持,则必须配置服务器或JDBC驱动程序(通过serverTimezone配置属性)以使用更具体的时区值。
解决方法
在db连接后面加上:?serverTimezone=UTC,
例:jdbc:mysql://localhost:3306/dbname?serverTimezone=UTC【可以指定时区问题】