0
点赞
收藏
分享

微信扫一扫

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

我是芄兰 2022-02-16 阅读 60

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

来自于:解决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 条评论