关于schema的报错问题如下,请问是怎么回事呢 ?

Multiple annotations found at this line: 
- schema_reference.4: Failed to read schema document 'http://www.osoa.org/xmlns/sca/1.0/spring-sca.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>. 
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'sca:service'.

心有法竹
浏览 707回答 2
2回答

宝慕林4294392

你spring配置文件的头部 schema出问题了&nbsp;1)http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd这个找不到&nbsp;3)这个文件的根元素不是<xsd:schema>&nbsp;你可以找个正确的把你这个xml配置文件的头部替换一下,不知道你使用的spring哪个版本,下面我贴一个:仅供参考,或者你可以在网上搜索一个正确的替换下:&nbsp;<?xml version="1.0" encoding="UTF-8"?>&nbsp;<beans&nbsp;xmlns="http://www.springframework.org/schema/beans"&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&nbsp;xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">&nbsp;</beans>

牛魔王的故事

<?xml version="1.0" encoding="UTF-8"?>&nbsp;<beans&nbsp;xmlns="http://www.springframework.org/schema/beans"&nbsp;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&nbsp;xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">&nbsp;</beans>
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java