Maven imports the eclipse project and sets the default jdk

Reference: http://jingyan.baidu.com/article/84b4f565efc39e60f7da326b.html


Modify the maven project: conf/setting.xml

<profile>  
    <id>jdk-1.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>   

save, refresh project

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325981878&siteId=291194637