maven 插件
一直没注意看maven执行过程中的打印日志,今天突然发现一段话,说编译以及resource未指定编码,默认gbk。于是,百度了设置编码的方式:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <source>1.8</source> <target>1.8</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>3.0.1</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin>
关注我的公众号
![](https://images2018.cnblogs.com/blog/686418/201808/686418-20180822091328437-1109977663.jpg)