springboot搭建-学习摘要-03
mybatis的逆向工程
问题:
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6:generate (default-cli) on project adapt: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
解决方法:
connectionURL加上 ?serverTimezone=UTC
还有 useSSL=false&
?useSSL=false&serverTimezone=Asia/Shanghai&characterEncoding=utf8&useUnicode=true
问题:
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.6:generate (default-cli) on project adapt: Unsupported character encoding 'utf8?serverTimezone=UTC'
解决方法:
写成下面这样
?serverTimezone=UTC&characterEncoding=utf-8
以上都没有解决我的问题,但是还是能解决此类问题的
怀疑是数据库的原因
用逆向工程生成的mapper.xml文件要注意delete方法,最好重新写一下

浙公网安备 33010602011771号