maven编译时报错,后面发现代码是用GBK编码编写,maven默认是用utf-8来编译。修改pom.xml

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>GBK</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

<encoding>GBK</encoding>

相关文章:

  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2021-12-25
  • 2021-08-22
  • 2021-11-10
猜你喜欢
  • 2021-07-28
  • 2022-12-23
  • 2022-12-23
  • 2022-01-10
  • 2021-11-07
相关资源
相似解决方案