zoukankan      html  css  js  c++  java
  • Invalid content was found starting with element 'mvc:exclude-mapping'.

    问题?Invalid content was found starting with element 'mvc:exclude-mapping'.


    这是springmvc中显著的错误,在配置拦截器的时候,会用到不拦截某一些请求

    如:

    1. mvc:interceptors>   
    2. <span style="white-space:pre">    </span>mvc:interceptor>   
    3. <span style="white-space:pre">        </span>mvc:mapping path=”/**”/>//过滤全部请求   
    4. <span style="white-space:pre">        </span>mvc:exclude-mapping path=”/hello.html”/> //除了hello这个请求   
    5. <span style="white-space:pre">        </span>bean class=”net.spring.interceptor.TestInterceptor” />   
    6. <span style="white-space:pre">    </span></mvc:interceptor>   
    7. </mvc:interceptors>   


    < mvc:exclude-mapping path=”/hello.html”/>
    //除了hello这个请求 

    这条语句就会出问题?会报以上的错误,Invalid content was found starting with element 'mvc:exclude-mapping'.原因是:mvc:exclude-mapping 标签不被spring-mvc-3.0.xsd支持,该配置在spring-mvc-3.2.xsd中支持。

    把http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd改成http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd

  • 相关阅读:
    ARM(ARM处理器)
    Android系统
    2014-9-17二班----11 web project
    2014-9-17二班----10 web project
    append() 、push() 和pop()的区别
    python hash
    虚拟机卡掉
    虚拟化
    heroinfo_set.all 函数
    encode()和decode()两个函数
  • 原文地址:https://www.cnblogs.com/toSeeMyDream/p/5805465.html
Copyright © 2011-2022 走看看