2).选择项目->properties->project facets修改java版本和Dynamic web module
同时修改项目路径文件
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
3).修改properties->java compiler中java版本
4).解决只显示resource文件
问题2:Maven项目,右键-update project后报错如下的解决办法:
1)、DescriptionResourcePathLocationType
Java compiler level does not match the version of the installed Java project facet.SSMDemo Maven WebUnknownFaceted Project Problem (Java Version Mismatch)
2)、DescriptionResourcePathLocationType
JAX-RS (REST Web Services) 2.0 requires Java 1.7 or newer.SSMDemo Maven Webline 1Maven Java EE Configuration Problem
3)、DescriptionResourcePathLocationType
One or more constraints have not been satisfied.SSMDemo Maven Webline 1Maven Java EE Configuration Problem
4). Type One or more constraints have not been satisfied.
解决办法:在pom.xml配置文件中加入如下语句: