元素web app必须在intellij(java、springmvc、maven)中声明为错误

元素web app必须在intellij(java、springmvc、maven)中声明为错误,java,maven,web.xml,Java,Maven,Web.xml,这是我的web.xml文件,必须将获取元素web app声明为错误 <web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.c

这是我的web.xml文件,必须将获取元素web app声明为错误

<web-app id="WebApp_ID" version="2.5"
    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">

    <display-name>SpringMVC 3.2 + Google Chart</display-name>

    <servlet>
        <servlet-name>frontController</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>WEB-INF/applnConfig.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>frontController</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

</web-app>

SpringMVC 3.2+谷歌图表
前线控制员
org.springframework.web.servlet.DispatcherServlet
上下文配置位置
WEB-INF/applnConfig.xml
1.
前线控制员
/

您正在使用部署描述符模式(web-app_2_5.xsd)版本2.5,它位于javaee名称空间()中。但是您已经给出了J2ee名称空间()

尝试使用Java EE 7命名空间:

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
     version="3.1">
</web-app>