在代码开头添加chcp 65001
注意-Dfile.encoding=utf-8必须直接跟到java后面
<properties>
<java.version>1.8</java.version>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
win上面为CRLF,呃,没人会在linux上面运行cmd吧
注意不能是UTF-8 BOM