前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Multiple annotations found at this line: - cvc-elt.1: Cannot find the declaration of element 'beans'

Multiple annotations found at this line: - cvc-elt.1: Cannot find the declaration of element 'beans'

作者头像
别先生
发布2021-01-05 14:51:02
1.1K0
发布2021-01-05 14:51:02
举报
文章被收录于专栏:别先生别先生

1、在使用eclipse构建基于maven的spring工程时,报下面的错误,如下所示:

代码语言:javascript
复制
1 Multiple annotations found at this line:
2  - cvc-elt.1: Cannot find the declaration of element 'beans'.
3  - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-3.2.xsd', because 1) could not find the 
4   document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

具体内容,如下所示:

错误原因,是因为我在maven pom.xml 中依赖的spring的版本和配置不匹配导致的。

此时,将bean.xml里面的schema引用由3.2改成4.0然后clean一下,刷新项目即可;

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2021-01-03 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档