如何在springMVC中解决此错误?

时间:2017-11-22 15:27:08

标签: spring spring-mvc

  

org.springframework.beans.factory.parsing.BeanDefinitionParsingException:   配置问题:无法找到Spring NamespaceHandler   XML模式命名空间[http://www.springframework.org/schema/context]

1 个答案:

答案 0 :(得分:1)

简答:在spring XML配置文件中使用正确的语法。

以下是包含上下文架构的示例:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="
http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc     http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/util    http://www.springframework.org/schema/util/spring-util.xsd">

... config stuff

</beans>