在eclipse中新建dubbo專案的時候引入dubbo的配置xml檔案報錯問題
阿新 • • 發佈:2019-01-31
專案引入Dubbo之後,XML檔案報錯:
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:service'.
- 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 <xsd:schema>.
如下圖所示:
其實在專案中也不影響使用,只是強迫症的話,看著感覺是專案報錯,就想著修改一下這裡的配置:
1: 解壓縮 Dubbo-*.jar 檔案,在檔案中找到 dubbo.xsd 檔案;
2:windows->preferrence->xml->xmlcatalog
add->catalog entry ->file system 選擇剛剛下載的檔案路徑
修改key值和配置檔案的http://code.alibabatech.com/schema/dubbo/dubbo.xsd 相同
儲存。。在xml檔案右鍵validate ok解決了。