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">
就能运行成功.
SpringMVC 搭建遇到的坑的更多相关文章
- springMVC搭建
springMVC搭建 1.Spring特点: 方便耦合,简化开发,提升性能 AOP面向切面的编程 声明式事务支持 方便程序的调试 方便集成各大优秀的框架 Java源代码学习的典范 2.Java的面向 ...
- 记一次ftp服务器搭建走过的坑
记一次ftp服务器搭建走过的坑 1.安装 ①下载 wget https://security.appspot.com/downloads/vsftpd-3.0.3.tar.gz #要FQ ②解压 ta ...
- 使用SpringMVC搭建第一个项目
概述 使用SpringMVC搭建第一个项目,入门教程,分享给大家. 详细 代码下载:http://www.demodashi.com/demo/10596.html 一.概述 1.什么是Spring ...
- Linux系统搭建GitLab---阿里云Centos7搭建Gitlab踩坑
一.简介 GitLab,是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目安装. 它拥有与GitHub类似的功能,能 ...
- elasticsearch 单节点搭建与爬坑记录
elasticsearch 单节点搭建与爬坑记录 prepare 虚拟机或者云服务器(这里用的是阿里云ECS) linux---centos7 安装完毕的jdk 相应的安装包(在https:/ ...
- springMVC学习总结(一) --springMVC搭建
springMVC学习总结(一) --springMVC搭建 搭建项目 1.创建一个web项目,并在项目中的src文件夹下创建一个包com.myl.controller. 2.添加相应jar包 3.在 ...
- 初学springMVC搭建框架过程及碰到的问题
刚刚开始学spring框架,因为接了一个网站的项目,想用spring+springMVC+hibernate整合来实现它,现在写下搭建框架的过程及碰到的问题.希望给自己看到也能让大家看到不要踏坑. 一 ...
- SpringMVC搭建+实例
想做一点自己喜欢的东西,研究了一下springMVC,所以就自己搭建一个小demo,可供大家吐槽. 先建一个WEB工程,这个相信大家都会,这里不在多说. 去网上下载spring jar包,然后在WEB ...
- Spring,SpringMvc配置常见的坑,注解的使用注意事项,applicationContext.xml和spring.mvc.xml配置注意事项,spring中的事务失效,事务不回滚原因
1.Spring中的applicationContext.xml配置错误导致的异常 异常信息: org.apache.ibatis.binding.BindingException: Invalid ...
随机推荐
- dedecms织梦(一)
网站动静态转换 织梦后台--->系统--->系统设置--->SQL命令行工具 1.将网站所有栏目设置成动态页 update dede_arctype set isdefault=-1 ...
- 第六篇——Struts2的后缀
Struts2后缀 1.Struts2默认后缀是action: 2.Struts2使用默认后缀时 *.aciton 和 * 都是同一个请求: 3.Struts2自定义后缀后只能使用自定义的后缀访问: ...
- 牛客网 完数VS盈数
题目链接:https://www.nowcoder.com/practice/ccc3d1e78014486fb7eed3c50e05c99d?tpId=40&tqId=21351&t ...
- 7、Kafka、AMQ、RabbitMQ对比
Kafka AMQ RabbitMQ 应用场景 AMQ/RabbitMQ Kafka
- 批量操作RunTime之获取的Dic换成Model
方法一: // // AlinkDeviceInfo.m //// // Created by Vivien on 2018/10/12. // Copyright © 2018年 . All rig ...
- C++ 将 std::string 转换为 char*
参考: std::string to char* C++ 将 std::string 转换为 char* 目前没有直接进行转换的方法.必须通过string对象的c_str()方法,获取C-style的 ...
- Sql语句中IN和exists的区别及应用
表展示 首先,查询中涉及到的两个表,一个user和一个order表,具体表的内容如下: user表: order表: in 确定给定的值是否与子查询或列表中的值相匹配.in在查询的时候,首先查询子查询 ...
- idea基于hibernate生成的Entitle对象,会忽略外键属性
需要自己手动添加 如 private String cgcode; @Basic @Column(name = "cgcode") public String getCgcode( ...
- Intellij IDEA创建git,maven的SpringMVC项目
Intellij IDEA创建git,maven的SpringMVC项目 原文链接:http://www.cnblogs.com/blog5277/p/8906120.html 原文作者:博客园--曲 ...
- 元注解——java.lang.annotation.Target(1.8)
参考资料:https://docs.oracle.com/javase/8/docs/api/java/lang/annotation/Target.html 普通注解’只能用来注解’代码’,而’元注 ...