springboot project Yes, but it is reported that the red cross

1. error reasons:

Description Resource Path Location Type
Cannot change version of project facet Dynamic Web Module to 2.5. sxnx-sms line 1 Maven Java EE Configuration Problem

solution:

In the project directory (the location of the project is located) has a .settings folder (linux system folder is hidden) open org.eclipse.wst.common.project.facet.core.xml

Make the following changes:

 <installed facet="jst.web" version="2.5"/>

2.

Content error: One or more constraints have not been satisfied.

Error reason: Deployment Assembly java version does not match with that maven default compiler version does not match the jdk use.

 

Solution: pom.xml file, add the following

<!-- 指定maven编译方式为jdk1.7版本 -->
<profiles>
<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>
</profiles>

Guess you like

Origin www.cnblogs.com/curedfisher/p/11809831.html