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包获取即可,无需从网上读取

  • 相关阅读:
    React+Redux仿Web追书神器
    关于贝塞尔曲线的故事
    420小时学习代码之后:如何教你免费自学Python
    学问Chat UI(3)
    学问Chat UI(1)
    Binder进程间通信详解
    Handler源码分析
    学问Chat UI(4)
    WebPack错误集
    React问题集序
  • 原文地址:https://www.cnblogs.com/libaowen609/p/12819718.html
Copyright © 2011-2022 走看看