The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.
Spring Cloud啟動jdbc報錯
1、Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value ‘?D1ú±ê×?ê±??’ 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.
2、org.springframework.orm.jpa.JpaSystemException: Unable to acquire JDBC Connection; nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
3、com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
4、com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server
解決方案:
將mysql maven依賴在pom文件中替換為一下版本,即可解決。
<dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>5.1.42</version></dependency>總結
以上是生活随笔為你收集整理的The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: idea 暂存文件或idea切换分支代码
- 下一篇: 企业实战_03_MyCat下载、安装、启