项目有时会出现 spring 配置文件报错,多出现在重新打开项目的时候,报错信息如下
multiple annotations found at this line:
- cvc-elt.1: Cannot find the declaration of element 'beans'.
- 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
document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
解决办法:1、删除 对应的 schena document 2、保存配置文件 3、重新黏贴 1中删除的 schena document,保存,此时就会发现报错已经没有了。