编译字符编码警告
问题
运行 mvn compile
控制台输出
[WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
处理方法
在 pom.xml
文件中添加 properties
标签
<project>
...
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
...
</project>
网友评论