spring-mvc.xml报错cvc-complex-type.2.4.c

添加
       <!-- 定义请求处理映射HandlerMapping -->
<bean id = "handlerMapping"
class = "org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<!--指定请求和controller对应的关系 -->
<property name = "mappings" ref = "urlMappings"/>
</bean>
<!-- 定义请求映射表 map -->
<util:properties id="urlMappings">
<prop key="/hello.form">helloController</prop>
</util:properties>

时报错:

cvc-complex-type.2.4.c:The matching wildcard is strict,but no declaration can be found for element 'util:properties'

在上面添加
xmlns:util="http://www.springframework.org/schema/util"
以及
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
上一篇:(转)解决dubbox-demo-provider.xml报错的问题:提示Failed to read schema document


下一篇:Eclipse 中 Spring 项目的 XML 配置文件报错 Referenced file contains errors