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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM