eclipse spring 配置文件xml校验时,xsd报错
1.情景展示
eclipse中,spring配置文件报错信息如下:

配置文件头部引用信息为:
<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd">
2.解决方案
将配置文件中的xsd文件的版本号去掉即可。
<?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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="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-xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-xsd">
去掉之后,已经不报错了!
3.可能会出现的情况
虽然eclipse不再报错,但是,在运行该项目时报错,即找不到对应的xsd,

如果你的也是这种情况,那只能让eclipse提示报错了,就是看着难受点。
eclipse spring 配置文件xml校验时,xsd报错的更多相关文章
- 解析流中的Xml文件时,报错:java.net.MalformedURLException: no protocol
原来的代码: // 创建DocumentBuilder对象 DocumentBuilder b = a.newDocumentBuilder(); // 通过DocumentBuilder对象的par ...
- Spring boot使用Redis时,报错,有redisTemplate和stringRedisTemplate两个bean?
Error starting ApplicationContext. To display the auto-configuration report re-run your application ...
- springBoot2.0使用@ImportResource引入spring配置文件.xml
1. 编写spring配置文件.xml 这里是bean.xml <?xml version="1.0" encoding="UTF-8"?> < ...
- maven项目解决pom.xml头部 http://maven.apache.org/xsd/maven-4.0.0.xsd报错的问题
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/qq_36611526/article/d ...
- eclipse 中忽略jsp, xml文件中的报错信息
有的时候, 在eclipse中, jsp, xml 文件时运行的好好的, 可是就是在eclipse中报错, 虽然不影响功能, 但看起来很烦, 去掉这些错误警告的方法是: Windows-Prefere ...
- web.xml配置文件中<async-supported>true</async-supported>报错
web.xml配置文件中<async-supported>true</async-supported>报错 http://blog.csdn.net/dream_ll/arti ...
- Spring AOP schema找不到报错 原
转自:https://my.oschina.net/zetaplusae/blog/144821 使用jersey+spring构建RESTful服务,并将应用部署在不能连接外网的服务器上.部署时,报 ...
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">报错
https://blog.csdn.net/qq_36611526/article/details/79067159 今天遇到个问题 文件内引入某个资源 pom.xml头部http://maven.a ...
- eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context was:(...”
eclipse 中离线安装activiti插件,报错“An error occurred while collecting items to be installed session context ...
随机推荐
- 【C++ Primer 第六章】 1. 定义模板
类模板 题目描述:实现StrBlob的模板版本. /* Blob.h */ #include<iostream> #include<vector> #include<in ...
- visual studio 2015百度云下载
visual studio 2015百度云下载 https://pan.baidu.com/s/1b198Zo3mX5_zA2VX3xRRfw 提取码: 关注公众号[GitHubCN]回复2015获取
- java:冒泡排序、选择排序、插入排序实现
整数排序 给一组整数,按照升序排序,使用选择排序,冒泡排序,插入排序或者任何 O(n2) 的排序算法. 样例 样例 1: 输入: [3, 2, 1, 4, 5] 输出: [1, 2, 3, 4, 5] ...
- asp.net core服务的生命周期
Transient:每一次GetService都会创建一个新的实例 Scoped:在同一个Scope内只初始化一个实例 ,可以理解为( 每一个request级别只创建一个实例,同一个http requ ...
- BZOJ1202 [HNOI2005]狡猾的商人 spfa
欢迎访问~原文出处——博客园-zhouzhendong 去博客园看该题解 题目传送门 - BZOJ1202 题意概括 有一个数列,共n个数字. 告诉你m个区间和,问是否矛盾. 数据组数<=100 ...
- Rstudio+mysql写入中文表
1.在mysql中输入sql语句,新建一个支持中文的数据库 create database Chinadaydata DEFAULT CHARACTER SET gbk COLLATE gbk_chi ...
- [洛谷P3014][USACO11FEB]牛线Cow Line (康托展开)(数论)
如果在阅读本文之前对于康托展开没有了解的同学请戳一下这里: 简陋的博客 百度百科 题目描述 N(1<=N<=20)头牛,编号为1...N,正在与FJ玩一个疯狂的游戏.奶牛会排成一行 ...
- grant 权限 on 数据库对象 to 用户
grant 权限 on 数据库对象 to 用户 一.grant 普通数据用户,查询.插入.更新.删除 数据库中所有表数据的权利. grant select on testdb.* to common_ ...
- String、StringBuffer和StringBulder
String:不可改变的Unicode字符序列. 池化思想,把需要共享的数据放在池中,用一个存储区域来存放一些公用资源以减少存储空间的开销. 在String类中,以字面值创建时,会到Java方法空间的 ...
- SQL RAISERROR 用法
) ), YOUR UNIQUEIDENTIFIER KEY) ,, @raiseErrorCode) RAISERROR ( N'This is message %s %d.', -- Messag ...