在maven setting.xml profiles节点下加入

<profile>
<id>jdk-1.8</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>

就可以了

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2021-07-24
  • 2021-06-17
  • 2022-12-23
猜你喜欢
  • 2021-06-02
  • 2021-06-28
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2021-10-25
  • 2022-12-23
相关资源
相似解决方案