随笔 - 597  文章 - 4  评论 - 445  阅读 - 424万

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

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

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一下,刷新项目即可;

 

posted on   别先生  阅读(1351)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?
历史上的今天:
2019-01-03 kafka单节点的安装,部署,使用
2019-01-03 VMware启动时提示我已移动或我已复制该虚拟机
2018-01-03 Spark入门,概述,部署,以及学习(Spark是一种快速、通用、可扩展的大数据分析引擎)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示