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.java
這是SpringBoot整合MySQL的依賴包版本太高,在高版本的MySQL依賴中數據庫和系統時區差別所形成的。系統爲SQL默認美國時間,而咱們中國要比他們遲8小時,所以將時區設置爲當前系統時區便可,採用+8:00格式mysql
兩種解決方案sql
1.下降 mysql-connector-java依賴版本 (使用5.1.x版本便可)數據庫
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.35</version> </dependency>
2.在JDBC鏈接url後添加時區屬性:url
&serverTimezone=GMT%2B8spa