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’. - schema_reference.4: Failed to read schema document ‘http://code.alibabatech.com/schema/dubbo/dubbo.xsd‘, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .
根據錯誤提示發現從http://code.alibabatech.com/schema/dubbo/dubbo.xsd地址下無法下載dubbo.xsd文檔,需要手動配置一下“
1. 去網上提前下載好dubbo.xsd文檔,保存到本地路徑下。
2. 在eclipse中選擇在windows->preferrence->xml->xmlcatalog->add->catalog entry ->file system
3.選擇下載好的dubbo.xsd文檔
4.修改Key值,要和配置文件中的”http://code.alibabatech.com/schema/dubbo/dubbo.xsd“地址一樣。
5.在xml文件右鍵validate就可以解決了。
如果繼續報錯:考慮是否版本問題
我一開始pom.xml 中配置
<!-- dubbo相關 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.5.3</version>
</dependency>
按照上述辦法依然報錯
改成
<!-- dubbo相關 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.6.0</version>
</dependency>
就不報錯了