参考链接:https://blog.csdn.net/caicaimaomao/article/details/136554931
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>3.1.1</version> <configuration> <charset>UTF-8</charset><!-- utf-8读取文件 --> <encoding>UTF-8</encoding><!-- utf-8进行编码代码 --> <docencoding>UTF-8</docencoding><!-- utf-8进行编码文档 --> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin>
二、问题解决
需要IDEA中进行配置,打开File | Settings | Build, Execution, Deployment | Build Tools | Maven | Runner在VM Options中添加-Dfile.encoding=GBK,切记一定是GBK。如果使用UTF-8的话,依然是乱码,这是因为Maven的默认平台编码是GBK。添加后重新执行,正常显示