在maven的settings.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> </profiles>

 

相关文章:

  • 2021-05-25
  • 2021-07-29
  • 2021-11-18
  • 2021-12-02
  • 2021-11-04
  • 2021-10-19
  • 2022-01-07
猜你喜欢
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
  • 2021-08-11
  • 2021-07-30
相关资源
相似解决方案