首页 > 其他 > 详细

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

时间:2021-01-03 15:23:19      阅读:55      评论:0      收藏:0      [点我收藏+]

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

技术分享图片

 

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

原文:https://www.cnblogs.com/biehongli/p/14225170.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!