解决eclipse:Referenced file contains errors(applicationContext.xml文件首行报错版本不一致)

本篇用于个人编程学习记录。

来自于:解决eclipse:Referenced file contains errors-百度经验 (baidu.com)icon-default.png?t=M1FBhttps://jingyan.baidu.com/article/29697b91bd24abab20de3c38.html

在eclipse中spring mvc声明部分报错如下所示:

Multiple annotations found at this line:    - Referenced file contains errors (http://www.springframework.org/schema/context/spring-context.xsd). For more information, right click on the      message in the Problems View and select "Show Details..."    - Referenced file contains errors (http://www.springframework.org/schema/mvc/spring-mvc.xsd). For more information, right click on the message      in the Problems View and select "Show Details..."

工具/原料

  • eclipse

方法/步骤

  1. 依次点击Window>Preferences

  2. 然后点击XML>XML Files >Validation,取消勾选:`Honour all XML schema locations`,这告诉eclipse,不再验证不同schema位置的相同命名空间的引用,仅以第一次找到的可验证的XML文件为结果。 然后点击下面的`Apply and Close`按钮,如下图所示.

  3. 接下来会弹出一个选择框,选`是`即可,如下图所示.

  4. 这样就不会报错了,如下图所示:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值