您的位置 首页 java

Multiple annotations found at this line:解决办法

Multiple annotations found at this line:

– schema_reference.4: Failed to read schema document ‘

spring-beans-3.1. 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>.

– cvc-elt.1: Cannot find the declaration of element ‘beans’.

如上,在使用eclipse构建基于 maven 的springmvc 工程时,报上面的错误

如下为spring的配置:

经百度和搜索,发现原来是因为我在maven pom .xml 中依赖的spring的版本和配置不匹配导致的。

我在pom.xml中使用的是

<spring.version>4.0.9. RELEASE </spring.version>

使用的是 4.0 版本的,但是上面是3.1版本的

把上面截图中的spring配置改为4.0 ,同时做一次clean操作,问题解决

文章来源:智云一二三科技

文章标题:Multiple annotations found at this line:解决办法

文章地址:https://www.zhihuclub.com/194121.shtml

关于作者: 智云科技

热门文章

网站地图