搭建Spring框架后,配件文件头部出现红色小×错误。

问题描述:
在搭建关于Spring相关框架的时候,在applicationContext.xml配置文件和servlet-mvc.xml配件文件的头部会出现一个红色的小X错误:
配置信息
错误描述:

Referenced file contains errors (http://www.springframework.org/schema/beans/spring-beans-3.1.xsd) 

虽然不影响正常程序的运行,但是项目中出现一个小红x看起来不顺眼,就寻找解决办法。

经百度找到一个合适的解决方案:

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

解决方案来源:百度

猜你喜欢

转载自blog.csdn.net/An1090239782/article/details/80079320
今日推荐