我在我的项目中使用了Spring3.2.5。因此,当我创建appliation-context.xml时,我收到以下警告:
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>我不知道问题出在哪里。
发布于 2015-03-06 19:24:44
我只需在我的applicationContext.xml上更改以下内容即可删除此警告:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
">通过
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
">因为(根据我所读到的)当使用第一个版本时,我们试图加载发布的最新版本,而我们实际使用的版本或不存在的版本无法支持该版本!
发布于 2018-05-21 00:47:35
我删除了这些行,错误就解决了。
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/beans/spring-context.xsd"发布于 2019-03-19 14:04:33
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/beans/spring-context.xsd“
您只需删除保存一次,并再次粘贴它。然后错误就消失了。
https://stackoverflow.com/questions/28895990
复制相似问题