zoukankan      html  css  js  c++  java
  • 解决eclipse spring-MVC配置报错:cvc-elt.1: Cannot find the declaration of element 'beans'.

       xsi:schemaLocation="
            http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd">

    spring-MVC配置一直报错:cvc-elt.1: Cannot find the declaration of element 'beans'.

    联网正常,  http://www.springframework.org/schema/beans/spring-beans.xsd,浏览器可正常打开。

    原因是无法从网络上读取到相应的schema文件,但实际上在浏览器中是可以访问的。

    可以改成    xsi:schemaLocation="
                              http://www.springframework.org/schema/beans
                             classpath:/org/springframework/beans/factory/xml/spring-beans-2.5.xsd
                             http://www.springframework.org/schema/context
                            http://www.springframework.org/schema/context/spring-context.xsd">

    从本地JAR包获取即可,无需从网上读取

  • 相关阅读:
    [APIO2012]派遣
    Luogu_2774 方格取数问题
    Luogu4149 [IOI2011]Race
    Luogu_4886 快递员
    Loj_6282. 数列分块入门 6
    LOJ 6281 数列分块入门 5
    三维偏序 cdq
    【逆序对】 模板
    【luogu P1637 三元上升子序列】 题解
    【luogu P3609 [USACO17JAN]Hoof, Paper, Scissor蹄子剪刀布】 题解
  • 原文地址:https://www.cnblogs.com/libaowen609/p/12819718.html
Copyright © 2011-2022 走看看