0
我的Spring配置文件是這樣的CVC-複雜type.2.4.c:匹配通配符是嚴格的,但沒有聲明可以發現元素「UTIL:性能」
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd">
.
.
.
<util:properties id="mailProperties">
<prop key="mail.smtp.auth">${mail.smtp.auth}</prop>
<prop key="mail.smtp.starttls.enable">${mail.smtp.starttls.enable}</prop>
<prop key="mail.smtp.quitwait">${mail.smtp.quitwait}</prop>
<prop key="mail.smtp.debug">${mail.smtp.debug}</prop>
</util:properties>
我得到以下在配置xml文件
schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/util/spring-util-3.0.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>.
錯誤讓我知道需要做
你使用的是什麼版本的彈簧? 它與xsi:schemaLocation中的版本號是否匹配? – 2014-03-06 17:01:32