JUnit測試是中文 maven test是亂碼

pom文件的 <build> <plugins> 里加入

<plugin>

       <groupId>org.apache.maven.plugins</groupId>

       <artifactId>maven-surefire-plugin</artifactId>

       <version>2.7.2</version>

       <configuration>

               <forkMode>once</forkMode>

               <argLine>-Dfile.encoding=UTF-8</argLine>

               <systemProperties>

                       <property>

                               <name>net.sourceforge.cobertura.datafile</name>

                               <value>target/cobertura/cobertura.ser</value>

                       </property>

               </systemProperties>

       </configuration>

</plugin>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章