zoukankan      html  css  js  c++  java
  • SpringMVC 搭建遇到的坑

    1. Caused by: org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 60; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'context:component-scan'.

    多半是配置文件缺少链接找不到资源引起的,或是springmvc 版本和xsd版本不一致引起的.

    idea新建的springMvc 工程,参考 https://blog.csdn.net/love_java_cc/article/details/76359815#commentBox

    生成的配置文件,有

    xmlns:context="http://www.springframework.org/schema/context"
    我在下文中增加了
    <context:component-scan base-package="com.spring.mvc"/>
    就出错了,还需要还需要添加 URL
    在dispatchcher-sevlet.xml 中增加
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    就能运行成功.
  • 相关阅读:
    TCP/IP三次握手四次挥手
    注解(JDK1.5之后)
    枚举(JDK1.5之后)
    局部内部类
    非静态内部类
    静态内部类
    匿名内部类
    接口
    根父类:java.lang.Object
    native关键字
  • 原文地址:https://www.cnblogs.com/changlili/p/10117269.html
Copyright © 2011-2022 走看看