解决eclipse spring配置报错:cvc-elt.1: Cannot find the declaration of element

解决eclipse spring配置报错:cvc-elt.1: Cannot find the declaration of element 'beans'.
Referenced file contains errors (http://www.springframework.org/schema/aop/spring-aop-3.1.xsd).

原因是无法从网络上读取到相应的schema文件,但实际上在浏览器中是可以访问的。
却一直在eclipse中显示红叉,当然,并不影响编译打包。

 

查看所依赖的jar包文件中是否真的存在相应的schema文件。

 

如果maven依赖的jar包已经存在相应schema文件,直接改为本地classpath依赖路径即可。

配置为本地classpath依赖路径之后,eclipse中的红叉报错提示消失。

 

参考:http://blog.csdn.net/legendj/article/details/9950963

posted @ 2016-12-05 09:02  nuccch  阅读(29367)  评论(1编辑  收藏  举报