欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

XML文件报错:Multiple annotations found at this line:

程序员文章站 2022-04-25 21:27:46
...
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..."
The errors below were detected when validating the file "spring-context.xsd" via the file "applicationContext_consumer.xml".  In most cases these errors can be detected by validating "spring-context.xsd" directly.  However it is possible that errors will only occur when spring-context.xsd is validated in the context of applicationContext_consumer.xml.

依次点击Window>Preferences
然后点击XML>XML Files >Validation,取消勾选:Honour all XML schema locations,这告诉eclipse,不再验证不同schema位置的相同命名空间的引用,仅以第一次找到的可验证的XML文件为结果。 然后点击下面的Apply and Close按钮,.
接下来会弹出一个选择框,选即可,如下图所示.
最后等待几分钟,就不会报错了
参考原文https://jingyan.baidu.com/article/29697b91bd24abab20de3c38.html

再次报错
Referenced file contains errors (http://www.springframework.org/schema/context/spring-context.xsd).
加上标签
参考https://zhidao.baidu.com/question/571289668.html

再次报错:
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call ‘refresh’ before accessing beans via the ApplicationContext
删掉标签,清理工程,重启zookeeper,activemq

Referenced file contains errors (http://www.springframework.org/schema/context/spring-context.xsd). For more information, right click on the message