biehongli

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

 

分类:

技术点:

相关文章:

  • 2021-06-03
  • 2021-06-23
  • 2021-12-27
  • 2021-10-26
  • 2021-12-03
  • 2022-12-23
  • 2022-01-21
  • 2021-05-06
猜你喜欢
  • 2021-09-21
  • 2022-12-23
  • 2021-06-23
  • 2021-11-29
  • 2022-12-23
  • 2021-09-19
相关资源
相似解决方案