mybatis 逆向工程生成代码时报错
Failed to execute goal org.mybatis.generator:
mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project springboot: 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.
-> [Help 1]
解决办法
spring.datasource.url = jdbc:mysql://localhost:3306/mydemo?useUnicode=true&characterEncoding=utf-8
后面加上 &serverTimezone=UTC
如下
spring.datasource.url = jdbc:mysql://localhost:3306/mydemo?useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC