解决方法1:
IDE 的 text file encoding 设置为 UTF-8
解决方法2:
pom中添加:
<!-- 解决3 字节的 UTF-8 序列的字节 3 无效 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>解决方法3:
修改xm的编码方式为GBK
推荐使用方法1和2
本文介绍了三种解决UTF-8编码问题的方法:1. 在IDE中设置textfileencoding为UTF-8;2. 在maven的pom文件中配置资源插件使用UTF-8编码;3. 修改XML文件的编码为GBK。推荐使用前两种方法。
1089

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



