spring项目中dubbo相关的配置文件出现红叉的问题

近来在eclipse中导入了一个web项目,但是发现项目上有红色的叉号。

原来是spring中关于dubbo的配置文件报错了。

Multiple annotations found at this line:
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'.

解决方法:

从网上下载下来dubbo.xsd文件

在eclipse 的偏好设置里,mac下   command+,搜索框中输入xml回车,在搜索出来的结果中选择XML Catalog,右边选择User Specified Entries,点击Add,Location中选择你刚刚下载下来的xsd文件。在Key这一项,记得修改为:http://code.alibabatech.com/schema/dubbo/dubbo.xsd

点击ok。之后。在出现红叉的xml文件上右键>validate。即可解决。

原文地址:https://www.cnblogs.com/sonofelice/p/4989689.html