mvn jetty:run--编码GBK的不可映射字符
解决方案
1.在pom.xml中build-plugins下将plugin:maven-resources-plugin设置为与项目的编码一致即可。譬如此处设置为UTF-8
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
<finalName>defalut_goal</finalName>
<defaultGoal>compile</defaultGoal>
</build>
2.在pom.xml中添加
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
3.mvn jetty:run -Dfile.encoding=UTF-8
清风徐来,水波不兴