今天突然在項目構建時發現有一條警告信息:
Using platform encoding (GBK actually) to copy filtered resources
由于項目中統一使用UTF-8編碼,所以這個地方是個潛在的問題,看了文檔發現,如果不顯式設置,maven會使用平臺的默認編碼,中文系統就是GBK了。
修改如下:
Using platform encoding (GBK actually) to copy filtered resources
由于項目中統一使用UTF-8編碼,所以這個地方是個潛在的問題,看了文檔發現,如果不顯式設置,maven會使用平臺的默認編碼,中文系統就是GBK了。
修改如下:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>