错误
在集成Mybatis-generator插件生成映射文件时报错:
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project quartz: 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 specific time zone value if you want to utilize time zone support.

解决方法
查看pom配置文件,发现配置mysql逆向生成的时候,为了省事直接copy过去的配置代码忘记将版本号一起换过去
原配置文件
使用了${mysql.version}但是没有在前面定义

所以将版本号加上去就可以了

总而言之可以出现这个问题可以去查看一下pom中Mybatis-generator插件的mysql驱动配置有没有问题

在使用Mybatis-generator插件时遇到错误:'服务器时区值‘XXX’不被识别或代表多个时区'。解决方法是检查并更新pom配置文件中的mysql驱动版本,确保在配置${mysql.version}时已正确定义。
最低0.47元/天 解锁文章
1281

被折叠的 条评论
为什么被折叠?



