The files configured in XML are as follows
<beans xmlns= "Http://www.springframework.org/schema/beans"
xmlns:context= "Http://www.springframework.org/schema/context" xmlns:p= "http://www.springframework.org/schema/p"
xmlns:aop= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP" xmlns:tx= "Http://www.springframework.org/schema/tx"
xmlns:dubbo= "Http://code.alibabatech.com/schema/dubbo"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/ Spring-beans-4.2.xsd
Http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP http://www.springframework.org/schema/aop/spring-aop-4.2.xsd/HTTP Www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
Http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd
Http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd ">
The way to detect if an XSD file can be read is to enter her XSD URL such as: http://www.springframework.org/schema/context/ Spring-context-4.2.xsd you will find that he exists, but you enter http://code.alibabatech.com/schema/dubbo/dubbo.xsd to find that he does not exist. When configured, the following error is reported:
Multiple annotations found at the 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
The solution is as follows:
Download a dubbo.xsd file put her in a path, and then
Windows->preferrence->xml->xmlcatalog
Add->catalog Entry->file System Select the path where the file you just downloaded is stored
Modify the key value to be the same as the http://code.alibabatech.com/schema/dubbo/dubbo.xsd of the configuration file in XML
Once saved, right-click on the XML file to validate.