出现以下错误时,
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.
一,可能是驱动版本问题,将com.mysql.jdbc.Driver加入cj改为com.mysql.cj.jdbc.Driver
二,连接mysql时指定时区为UTC,将"jdbc:mysql://localhost:3306/testjdbc"加入?serverTimezone=UTC改为"jdbc:mysql://localhost:3306/testjdbc?serverTimezone=UTC"