报错:


org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:


nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:annotation-config'.

---------------------

原因:缺少dubbo.xsd

解决步骤:

一:下载dubbo.xsd


1 第一种办法:百度云下载 https://pan.baidu.com/s/16N0PDU0zcyFWlMa2PML1OA


2 第二种办法:这个dubbo.xsd就在你的dubbo.jar包里,解压后在路径里dubbo\META-INF就可以找到。

---------------------


二:配置

window-->preferences-->xml-->xml Catalog

1.在xml Catalog里

点击User Specified Entries再点Add再点FileSystem

进入你解压的dubbo.xsd放的位置

2.在Add XML Catalog Element里

Location:D:\install\dubbo\dubbo.xsd

Key type: SchemaLocation

Key: http://code.alibabatech.com/schema/dubbo/dubbo.xsd

三:最后:右键-->validate

注意:配置的目的是在xml中快捷键显示