问题:org.springframework.jdbc.CannotGetJdbcConnectionException: 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.
Caused by: 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版本为新版,连接参数需要加上时区
**解决:**新版的mysql驱动类更新成了
com.mysql.cj.jdbc.Driver
连接的时候也需要注意时区的问题,在url的连接参数上设置时区即可:我这里设置的是北京时区
url: jdbc:mysql:///test01?serverTimezone=GMT%2B8