开发者社区 问答 正文

Spring mvc启动报错?报错

1.spring-servelt.xml 配置如图:

启动报错:

org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.

问:还少什么配置吗?怎么回事啊,求解释。。。



展开
收起
爱吃鱼的程序员 2020-06-22 22:08:52 478 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    xsi:schemaLocation中写错了一个词:contex<--少了一个t正解<divclass="ref">

    引用来自“笨街牛”的答案

    <divclass=ref_body>xsi:schemaLocation中写错了一个词:contex<--少了一个t提示的很明显了,schemaLocation里引用context时,写成thttp了。
    +1灰常感谢楼上各位,我想shi的心都有了. (>_<)
    这些东西不建议手写!在文档中COPY过来<divclass="ref">

    引用来自“鎕_鎕”的答案

    <divclass=ref_body>灰常感谢楼上各位,我想shi的心都有了. (>_<)

    2020-06-22 22:09:08
    赞同 展开评论