在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>
(adsbygoogle = window.adsbygoogle || []).push({});