This error occurs when running the example
2021-06-25 10:14:14.571 ERROR 10096 — [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; 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.] with root causeSolution:
2021-06-25 10:14:14.571 ERROR 10096 — [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; 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.] with root causeSolution:
add the following codes to application.properties
spring.datasource.url=jdbc:mysql://localhost:3306/you_mysql?serverTimezone=UTC
Read More:
- [Solved] Tomcat Server Error: java.lang.NullPointerException Csonsole Error ClassNotFoundException: com.mysql.jdbc.Driver
- [Solved] Cannot find class: com.mysql.jdbc.Driver
- [Solved] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure error
- Extracting JDBC tool class: JDBC utils
- [Solved] Spring jdbctemplate Error: ‘Java. SQL. Driver’ for property ‘driver’: no
- How to Solve JDBC connection error in spring MVC integration
- [Solved] init datasource error, url: jdbc:mysql://localhost:3306/test
- Spring Boot Error starting ApplicationContext. To display the auto-configuration report re-run you
- How to Solve Error: No suitable driver found for
- [Solved] Spring Boot Error: org.springframework.jdbc.datasource.embedded.EmbeddedData
- [Solved] SpringBoot Microservices: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded dat
- Configuration of springboot + Druid connection pool
- How to Download File via Response (Example Code)
- [Solved] Default native-compiler executable ‘cl.exe‘ not found via environment variable PATH
- [Solved] 530 This server does not allow plain FTP. You have to use FTP over TLS
- [Solved] com.highgo.jdbc.util.PSQLException:bad value for long
- Java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver [How to Solve]
- [Solved] mybatis Error querying database. Cause: java.sql.SQLException: The server time zone value
- Eclipse Error: There are no resources that can be added or removed from the server.
- ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration…