您的位置:首页 > 编程语言 > Java开发

eclipse 中maven test运行后console中出现中文乱码问题解决方法

2016-04-24 00:00 465 查看
摘要: eclipse 中maven test运行后console中出现中文乱码问题解决方法

在pom.xml中添加如下配置,保存后重新运行maven test就不会出现中文乱码了:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息