http://blog.csdn.net/jsjszg/article/details/9237189
*************************************************
方法一:在pom.xml的/project/build/plugins/下的编译插件声明 中加入下面的配置:
<encoding>UTF-8</encoding>
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.1</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin>
方法二:在pom.xml的/project/properties/下的属性配置 中加入下面的配置:
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> </properties>