1、修改编码
全局编码设置:
File -> Other Settings -> Default Settings->file encoding
工程编码设置:
File -> Settings->file encoding
改成:UTF-8
2、maven的pom.xml的修改
<build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> </plugins> </build>