MyBatis-Spring-Boot icon indicating copy to clipboard operation
MyBatis-Spring-Boot copied to clipboard

请问, 用generator生成的model注释乱码,怎么解决?

Open songyc5 opened this issue 8 years ago • 6 comments

用的是Idea16. 有按博主的文章调整过编码格式的.

songyc5 avatar Apr 03 '17 04:04 songyc5

maven 插件?设置编码试试。

abel533 avatar Apr 04 '17 10:04 abel533

嗯, 用的maven插件. 自动翻译的那部分注释会乱码. 生成之后,尝试过常用编码都是乱码. 想问下, 能不能设置不生成那段注释呢?

songyc5 avatar Apr 09 '17 14:04 songyc5

除非自己实现插件。

abel533 avatar Apr 09 '17 15:04 abel533

是不是生成工具里设置了gbk编码

shenzhuan avatar Jun 28 '17 07:06 shenzhuan

4月份用的时候 还没有问题

shenzhuan avatar Jun 28 '17 07:06 shenzhuan

@shenzhuan @songyc5 可以尝试在generatorConfig.xml中进行如下配置

<context>   
    <property name="javaFileEncoding" value="utf-8" />   
</content>  

whyalwaysmea avatar Apr 03 '18 09:04 whyalwaysmea