异常:
spring
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
servlet
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.
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException
解决:
将
jdbcUrl=jdbc:mysql://localhost:3306/db
改为:
jdbcUrl=jdbc:mysql://localhost:3306/db?serverTimezone=UTC
网友评论