跪求帮助 Spring mvc 报错

mgzlj19870406 2010-06-09 12:39:03
在使用spring2.5时,采用spring2.5的注解MVC 出现错误
配置文件
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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-3.0.xsd">


<!-- annotation-driven Spring MVC Controller -->
<mvc:annotation-driven />

报错信息:
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: ServletContext resource [/WEB-INF/dispatcherContext.xml]

解决了半天了,就不知道怎么回事,请帮忙,谢谢了
...全文
1448 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
at1943 2011-06-14
  • 打赏
  • 举报
回复
<mvc:annotation-driven />这是3.0新加的注解
heamer 2011-02-14
  • 打赏
  • 举报
回复
很明显你的配置文件是spring 3.0的啊

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧