首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >架构引用无法读取架构

架构引用无法读取架构
EN

Stack Overflow用户
提问于 2015-03-06 17:39:53
回答 3查看 17.7K关注 0票数 3

我在我的项目中使用了Spring3.2.5。因此,当我创建appliation-context.xml时,我收到以下警告:

代码语言:javascript
复制
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>

我不知道问题出在哪里。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2015-03-06 19:24:44

我只需在我的applicationContext.xml上更改以下内容即可删除此警告:

代码语言:javascript
复制
<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 
  ">

通过

代码语言:javascript
复制
<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 
">

因为(根据我所读到的)当使用第一个版本时,我们试图加载发布的最新版本,而我们实际使用的版本或不存在的版本无法支持该版本!

票数 6
EN

Stack Overflow用户

发布于 2018-05-21 00:47:35

我删除了这些行,错误就解决了。

代码语言:javascript
复制
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"
票数 0
EN

Stack Overflow用户

发布于 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

您只需删除保存一次,并再次粘贴它。然后错误就消失了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28895990

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档