打开POM文件 找到如下PLUGIN,将文中红色的地方添加到POM文件中.
mvn clean;
mvn jetty:run
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>1.0-alpha-1</version>
<configuration>
<dest>target/classes</dest>
<src>src/main/resources</src>
</configuration>
<executions>
<execution>
<id>native2ascii-utf8</id>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>[color=red]UTF-8[/color]</encoding>
<includes>
ApplicationResources_ko.properties,
ApplicationResources_no.properties,
ApplicationResources_tr.properties,
[color=red]*_zh*.properties [/color]
</includes>
</configuration>
</execution>
<execution>
<id>native2ascii-8859_1</id>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>8859_1</encoding>
<includes>
ApplicationResources_de.properties,
ApplicationResources_fr.properties,
ApplicationResources_nl.properties,
ApplicationResources_pt*.properties
</includes>
</configuration>
</execution>
</executions>
</plugin>
以及——
<resource>
<directory>src/main/resources</directory>
<excludes> <exclude>ApplicationResources_de.properties</exclude>
<exclude>ApplicationResources_fr.properties</exclude>
<exclude>ApplicationResources_ko.properties</exclude>
<exclude>ApplicationResources_nl.properties</exclude>
<exclude>ApplicationResources_no.properties</exclude>
<exclude>ApplicationResources_pt*.properties</exclude>
<exclude>ApplicationResources_tr.properties</exclude>
[color=red]<exclude>*_zh*.properties</exclude>[/color]
<exclude>applicationContext-resources.xml</exclude>
<exclude>struts.xml</exclude>
</excludes>
<filtering>true</filtering>
</resource>
mvn clean;
mvn jetty:run
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>1.0-alpha-1</version>
<configuration>
<dest>target/classes</dest>
<src>src/main/resources</src>
</configuration>
<executions>
<execution>
<id>native2ascii-utf8</id>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>[color=red]UTF-8[/color]</encoding>
<includes>
ApplicationResources_ko.properties,
ApplicationResources_no.properties,
ApplicationResources_tr.properties,
[color=red]*_zh*.properties [/color]
</includes>
</configuration>
</execution>
<execution>
<id>native2ascii-8859_1</id>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>8859_1</encoding>
<includes>
ApplicationResources_de.properties,
ApplicationResources_fr.properties,
ApplicationResources_nl.properties,
ApplicationResources_pt*.properties
</includes>
</configuration>
</execution>
</executions>
</plugin>
以及——
<resource>
<directory>src/main/resources</directory>
<excludes> <exclude>ApplicationResources_de.properties</exclude>
<exclude>ApplicationResources_fr.properties</exclude>
<exclude>ApplicationResources_ko.properties</exclude>
<exclude>ApplicationResources_nl.properties</exclude>
<exclude>ApplicationResources_no.properties</exclude>
<exclude>ApplicationResources_pt*.properties</exclude>
<exclude>ApplicationResources_tr.properties</exclude>
[color=red]<exclude>*_zh*.properties</exclude>[/color]
<exclude>applicationContext-resources.xml</exclude>
<exclude>struts.xml</exclude>
</excludes>
<filtering>true</filtering>
</resource>