spring+maven 报错 Multiple annotations found at this line: 解决办法
2017-02-21 21:22
579 查看
Multiple annotations found at this line:
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/
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的配置:
![](https://img-blog.csdn.net/20161011090114345?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
经百度和搜索,发现原来是因为我在maven pom.xml 中依赖的spring的版本和配置不匹配导致的。
我在pom.xml中使用的是
<spring.version>4.0.9.RELEASE</spring.version>
使用的是 4.0 版本的,但是上面是3.1版本的
把上面截图中的spring配置改为4.0 ,同时做一次clean操作,问题解决
![](https://img-blog.csdn.net/20161011090450651?watermar<br/>4000<br/>k/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/
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操作,问题解决
相关文章推荐
- spring Multiple annotations found at this line: 解决办法
- Multiple annotations found at this line: 解决办法
- jsp页面出现:Multiple annotations found at this line:的解决办法
- 如何解决dubbo配置文件中Multiple annotations found at this line问题
- MyEclipse中出现Multiple annotations found at this line: - Syntax error, insert "}" to complete 错误解决方法
- Multiple annotations found at this line:解决
- Eclipse中解决Multiple annotations found at this line错误。
- spring配置错误Multiple annotations found at this line
- 解决 导入他人做的项目后出现Multiple annotations found at this line 的问题
- JSP:Multiple annotations found at this line 解决
- 解决eclipse Multiple annotations found at this line 错误
- maven报错Multiple annotations found at this line
- maven引入log4j-1.2.15,出错Multiple annotations found at this line:
- 解决Jsp报错:Multiple annotations found at this line
- SpringMVC-FAQ(3):<转载>jsp文件--Multiple annotations found at this line 解决
- 解决eclipse Multiple annotations found at this line 错误
- Maven pom.xml报错 Multiple annotations found at this line
- Maven pom.xml报错Multiple annotations found at this line: - Missing artifact log4j:log4j:jar:1.2.15:co
- Maven pom.xml报错Multiple annotations found at this line: - Missing artifact log4j:log4j:jar:1.2.15:co
- Multiple annotations found at this line——已解决