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

  • 相关阅读:
    Vue学习笔记-基本语法
    Vue学习笔记-使用ElementUI
    Vue学习笔记-目录结构
    Arcgis api for javascript学习笔记(3.2版本)
    _countof
    自启动在UAC开启状态下解决方案
    windows常见启动项启动顺序
    ssh登录的一个小问题
    centos5.5 环境变量设置
    avalon2 第一个demo
  • 原文地址:https://www.cnblogs.com/toSeeMyDream/p/5805465.html
Copyright © 2011-2022 走看看