转自:https://blog.youkuaiyun.com/qq_33811662/article/details/80532699
Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value 'PDT' 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属性后面加上 serverTimezone=UTC
eg:
[
原来传递url,
实参(value)是"jdbc:mysql://localhost:3306/dbname".
现在应该是这样的:
"jdbc:mysql://localhost:3306/dbname?serverTimezone=UTC".
]