eclipse 中maven test運行後console中出現中文亂碼問題解決方法

在pom.xml中添加以下配置,保存後從新運行maven test就不會出現中文亂碼了: apache

  <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>
maven

相關文章
相關標籤/搜索