JDBC时区异常错误解决

**

com.mysql.cj.exceptions.InvalidConnectionAttributeException: The server time zone value ‘Öйú±ê׼ʱ¼ä’ is unrecognized or represents more than one time zone异常

**

解决方法:在配置文件appliction.properties文件中修改
spring.datasource.url=jdbc:mysql://localhost:3306/dp?后面添加useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC

你可能感兴趣的:(JDBC时区异常错误解决)