Spring xml配置出现Referenced file contains errors(........)的 解决方法

在spring项目开发中进行配置事经常发生Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-4.1.xsd)类似的问题,在此总结了几种解决方案

第一种

如果你的工具比较新,有可能是缺少标签,加上xml boday标签就ok

Spring xml配置出现Referenced file contains errors(........)的 解决方法_第1张图片

第二种

将 Preferences > XML > XML Files > Validation中"Honour all XML schema locations"前的对号去掉。它将禁用指向不同schema位置相同命名空间引用的验证,仅以第一次找到的可验证的XML文件为结果。

Spring xml配置出现Referenced file contains errors(........)的 解决方法_第2张图片

第三种

检测下导入的对应的spring-beans的包版本号是否相符

这就是我遇到和总结的几种情况和解决方案,希望能给大家带来帮助!

你可能感兴趣的:(Spring xml配置出现Referenced file contains errors(........)的 解决方法)