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

posted on 2016-01-12 21:44  J·Marcus  阅读(2744)  评论(0编辑  收藏  举报

导航