異常:
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