Dubbo-xml文件出现的错误-cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element

最近心血来潮,决定搭建一次dubbo生产者和消费者的过程,在搭建dubbo生产者的时候,一直报一个错误:

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

从网上百度了好多答案,但是都没有解决问题,后来借签一位大神的做法,问题终于得到解决。解决步骤如下:

1.Windows->>Preferences->>XML Catalog,选择User Specified Entries,点击Add按钮

2.选择File System,找到本地Maven中dubbo.xsd的所在路径,将其填入到Location中

3.在key那里填写:http://code.alibabatech.com/schema/dubbo/dubbo.xsd

点击OK完成,在将报错的XML文件,右键进行validate即可。问题得到解决。

原文地址:https://www.cnblogs.com/haibaowang/p/7404352.html