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

  • 相关阅读:
    Python第二
    Python第一讲以及计算机基础
    MySQL第五讲
    MySQL第四讲
    MySQL第三讲
    MySQL第一讲概论
    MySQL日常笔记第二讲
    Linux修改用户组
    XAMPP中proftpd的简明配置方法
    解决php configure: error: Cannot find ldap libraries in /usr/lib.错误
  • 原文地址:https://www.cnblogs.com/libaowen609/p/12819718.html
Copyright © 2011-2022 走看看