前缀" xmnls" for attribute" xmnls:mvc"与元素类型相关联" beans"不受约束

时间:2016-11-01 05:00:29

标签: xml spring-mvc

错误*前缀" xmnls" for attribute" xmnls:mvc"与元素类型相关联" beans"不受约束。         请帮帮我..谢谢。*

This is my Spring-Dispatcher-Servlet.xml

        <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:context="http://www.springframework.org/schema/context"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmnls:mvc="http://www.springframework.org/schema/mvc"
            xsi:schemaLocation="
           http://www.springframework.org/schema/beans     
           http://www.springframework.org/schema/beans/spring-beans-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/mvc
           http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">


           <context:component-scan base-package="com.gontu.Annotation.Helloexample"></context:component-scan>
           <mvc:annotation-driven/>

           <bean id = "viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
           <property name="prefix">
            <value>/WEB-INF/</value>
           </property>
              <property name="suffix">
            <value>.jsp</value>
           </property>
           </bean>
           </beans>

1 个答案:

答案 0 :(得分:1)

更改

       xmnls:mvc="http://www.springframework.org/schema/mvc"
         ^^

       xmlns:mvc="http://www.springframework.org/schema/mvc"
         ^^