BeanDefinitionParsingException

呜呜呜呜喂喂喂 发布于 2015/07/15 13:40
阅读 480
收藏 0

用tomcat发布时弹出的异常:

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/mvc]

Offending resource: URL [file:/F:/workspace_luna/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/springMVCtext1/WEB-INF/classes/config/springMVC-servlet.xml]


springMVC-servlet.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:context="http://www.springframework.org/schema/context"
 xmlns:p="http://www.springframework.org/schema/p"
 xmlns:mvc="http://www.springframework.org/schema/mvc"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 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-3.0.xsd
        ">
        
    <bean name="/test1/img" class="com.dhc.web.controller.MultiController">
      <property name="methodNameResolver">
      <ref bean="paramNameResolver"/>
      </property>
    </bean>
    
    <!-- 静态访问资源 -->
    <mvc:resources location="/img/" mapping="/img/**"/>
       
    <bean name="/test1/multi" class="com.dhc.web.controller.MultiController">
      <property name="methodNameResolver">
      <ref bean="paramNameResolver"/>
      </property>
    </bean>
    <bean id="paramNameResolver" class="org.springframework.web.servlet.mvc.multiaction.ParameterMethodNameResolver">
<property name="paramName" value="action"></property>
</bean>      

    <bean name="/test1/helloworld" class="com.dhc.web.controller.HelloWorldController" ></bean>

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


</beans>
请问这个异常怎么解决?  

加载中
返回顶部
顶部