suki3100 2012-04-05 19:02
浏览 328
已采纳

配置Spring mvc 注解配置的时候 静态页面跳转 报的错

相应的包 都加了, 就是报错,

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 16 in XML document from ServletContext resource [/WEB-INF/dispatcher-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:default-servlet-handler'.

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:default-servlet-handler'.

  • 写回答

1条回答 默认 最新

  • jep1983 2012-04-08 17:26
    关注

    mvc:default-servlet-handler/这个标签是在spring3.0.4发布之后才有的,现在如果用这个标签,因为spring官方的http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd 还没有更新。所以会报错,有以下方法可以代替:
    手动将3.0.4版本中的spring-mvc-3.0.xsd添加到本地的xml catalog 中,xsd所在位置:
    org.springframework.web.servlet-3.0.4.RELEASE.jar\org\springframework\web\servlet\config。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记