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 ...
随机推荐
- Thread + 匿名内部类
package chapter01; public class MyThread01 extends Thread{ @Override public void run() { //让当前线程执行的代 ...
- java基础篇---HTTP协议
java基础篇---HTTP协议 HTTP协议一直是自己的薄弱点,也没抽太多时间去看这方面的内容,今天兴致来了就在网上搜了下关于http协议,发现有园友写了一篇非常好的博文,博文地址:(http: ...
- div展开与收起(鼠标点击)
效果图: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF- ...
- 使用SqlSugar 4.X的T4生成实体类
<#@ template debug="false" hostspecific="true" language="C#" #> ...
- 怎么用pr(Premiere)给视频添加水印
自己辛辛苦苦剪切的视频,不添加水印,别人肯定会搬走的,作为对视频付出时间的你肯定不想看见这样的事情,下面一起来看看怎么用pr给视频添加水印吧 工具/原料 水印 pr 方法/步骤 首先打 ...
- 第一个Struts2实例之hello world!
Struts官网:http://struts.apache.org/ Struts2框架预先实现了一些功能 1:请求数据自动封装 2:文件上传的功能 3:对国际化功能的简化 4 ...
- 阿里巴巴的26款超神Java开源项目
目录 1.分布式应用服务开发的一站式解决方案 Spring Cloud Alibaba 2. JDBC 连接池.监控组件 Druid 3. Java 的 JSON 处理器 fastjson 4. 服务 ...
- Jedis入门
一:介绍 1.Jedis的官网 2.使用 这个可以从上面的连接进入github. https://github.com/xetorthio/jedis 3.使用方式 或者使用jar包,不过这里我使用官 ...
- [OpenCV-Python] OpenCV 中的图像处理 部分 IV (四)
部分 IVOpenCV 中的图像处理 OpenCV-Python 中文教程(搬运)目录 21 OpenCV 中的轮廓 21.1 初识轮廓目标 • 理解什么是轮廓 • 学习找轮廓,绘制轮廓等 • 函数: ...
- HDU 2896 病毒侵袭【AC自动机】
<题目链接> Problem Description 当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻....在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一 ...