把maven工程导入到eclipse中,有时候会出现如下警告:[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform
这说明你没有指定编码,只能按照平台的默认编码进行拷贝。所以需要在pom.xml中制定编码格式:
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
制定的编码类型跟eclipse指定的编码格式保持一致。