解决方案1:在maven的conf\setting.xml文件中找到jdk配置的地方,修改如下:

       <profile> 
               <id>jdk1.7</id>  
               <activation> 
                   <activeByDefault>true</activeByDefault>  
                   <jdk>1.7</jdk> 
               </activation>  
               <properties> 
                   <maven.compiler.source>1.7</maven.compiler.source>  
                   <maven.compiler.target>1.7</maven.compiler.target>  
                   <maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion> 
               </properties> 
           </profile>

解决方案2:修改项目中pom.xml文件,修改如下:

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <source>1.7</source>
                            <target>1.7</target>
                        </configuration>
                    </plugin>
                </plugins>
            </build>

解决方案3:修改项目中pom.xml文件,修改如下:

	<properties>
		<maven.compiler.source>1.7</maven.compiler.source>
		<maven.compiler.target>1.7</maven.compiler.target>
		<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>
	</properties>




Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐