One or more constraints have not been satisfied...

1、在pom.xml里面增加插件:

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

2、项目右键Properties > Java Build Path > Library 中的JDK与Workspace默认的一致,都是1.8。

3、Java Compiler > Compiler compliance level 是1.8。

4、Project Facets > Dynamic Web Module 是最新的,Java是1.8。

5、项目根目录/ .settings/org.eclipse.wst.common.project.facet.core.xml中“java”和“jst.web”与第4点一致。

6、Maven > Update Project 一下。

发布了362 篇原创文章 · 获赞 121 · 访问量 61万+

猜你喜欢

转载自blog.csdn.net/daqiang012/article/details/103914633