spring配置中spring mvc的定义解析一直报错

demondeviljet 2013-09-28 12:22:44


头文件引入都没有问题
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
同时在eclipse中添加了spring-mvc-3.0.xsd的xml catalog

服务器启动没有问题 程序也能运行正常 但就在applicationContext.xml文件中<mvc:annotation-driven />这句一直打红叉 不知道为何 ????
...全文
3956 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
fengchengblogs 2016-05-10
  • 打赏
  • 举报
回复
问题解决了吗?我也出现这个问题了 求指教
tony4geek 2016-03-23
  • 打赏
  • 举报
回复
xsd 的验证没有通过。
threedong 2016-03-23
  • 打赏
  • 举报
回复
红叉上面写了啥? 项目能启动就说明没问题,可能是你eclipse一时没反应过来。 去掉就好了。
  • 打赏
  • 举报
回复
xmlns:mvc="http://www.springframework.org/schema/mvc" 添加完成之后还是报错, <?xml version="1.0" encoding="UTF-8"?> <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" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd 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-3.1.xsd "> <context:component-scan base-package="zttc.itat.model" /> <mvc:annotation-driven /> <bean name="/welcome.html" class="zttc.itat.controller.WelcomeController"></bean> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/jsp/" /> <property name="suffix" value=".jsp" /> </bean> </beans>
DuanKong86 2014-02-23
  • 打赏
  • 举报
回复
xmlns:mvc="http://www.springframework.org/schema/mvc" 这个命名空间加了吗

67,512

社区成员

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

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