Spring配置文件xml约束出错

来源:互联网 发布:英语句子成分解析软件 编辑:程序博客网 时间:2024/05/19 11:36
Multiple annotations found at this line:
- cvc-elt.1: Cannot find the declaration of element 'beans'.
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.xsd', because 1) could not 

find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

在写Spring的配置文件时候出现这种错误。



从网上搜了一些,有的说是因为网络原因访问不到xsd文件,因为访问不到网络上的xsd文件,我们可以访问本地的啊,在引入的spring的包中spring-beans-3.2.2.RELEASE.jar中有spring-beans-3.0.xsd文件,其他的xsd文件也都能在相应的包中找到,这样就好说了,把xsd文件的引用全部改为本地文件,我们只需要在报错的地方把www去掉就行了。

原创粉丝点击