javaweb实训第五天下午——xml配置文件约束报错问题

简介: 问题描述:如果电脑连不上网,或者网速不好可能会造成Spring框架中xml配置文件出现错误。但是这个错误不影响项目的运行的;

问题描述:

  1. 如果电脑连不上网,或者网速不好可能会造成Spring框架中xml配置文件出现错误。但是这个错误不影响项目的运行的;
<beans xmlns="http://www.springframework.org/schema/beans" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:aop="http://www.springframework.org/schema/aop"
  xmlns:context="http://www.springframework.org/schema/context" 
  xmlns:jee="http://www.springframework.org/schema/jee" 
  xmlns:util="http://www.springframework.org/schema/util"
  xmlns:tx="http://www.springframework.org/schema/tx"
  xmlns:mvc="http://www.springframework.org/schema/mvc"
  xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
    http://www.springframework.org/schema/mvc 
    http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
    http://www.springframework.org/schema/aop
        http://www.springframework.org/schema/aop/spring-aop-4.1.xsd">

从上面可以知道xml文件中是一大堆Schema约束,而且是在线的(看黄色部分),如果没有网络或网络较差可能就会出现错误;

解决办法:将这个url地址关联到本地Schmea约束(课件 – day01 – resources – schema – 各种各样的约束)

Spring系列.xml报错:

20210602155654807.png

一般情况下错误提示中会是context报错:

20210602155706446.png

一般情况下错误提示中会是context报错:

20210602155710170.png

选择XML Catalog – 点击Add…添加:

20210602155713733.png

Location要与Key相对应:

20210602155717518.png

20210602155728431.png

一定要清理下:

20210602155733342.png

2021060215574725.png 

目录
相关文章
|
2月前
|
XML JavaScript 数据格式
打开 XML 文件报错 There is no Unicode byte order mark
打开 XML 文件报错 There is no Unicode byte order mark
43 0
|
3天前
|
安全 Go
解决https页面加载http资源报错
请注意,混合内容可能导致安全性问题,因此在使用上述方法时要小心。最好的方式是尽量减少或完全消除混合内容,以确保页面的安全性。
5 0
|
1月前
|
Java 应用服务中间件
解决tomcat启动报错:无法在web.xml或使用此应用程序部署的jar文件中解析绝对的url [http:java.sun.com/jsp/jstl/core]
解决tomcat启动报错:无法在web.xml或使用此应用程序部署的jar文件中解析绝对的url [http:java.sun.com/jsp/jstl/core]
132 1
|
1月前
|
XML JSON 数据格式
xml文档解析报错解决办法
xml文档解析报错解决办法
|
2月前
|
Kubernetes 容器
使用kubeadm部署k8s报错:The kubelet is not running或者level=error msg="Handler for POST /v1.43/images/create returned error: Head \"https://us-west2-dock
使用kubeadm部署k8s报错:The kubelet is not running或者level=error msg="Handler for POST /v1.43/images/create returned error: Head \"https://us-west2-dock
|
4月前
|
XML 数据格式
restTemplat发post请求报错Content type ‘application/xml;charset=UTF-8‘ not supported“
restTemplat发post请求报错Content type ‘application/xml;charset=UTF-8‘ not supported“
|
5天前
|
XML 数据格式
小米备份descript.xml文件
小米备份descript.xml文件
12 0
|
16天前
|
XML Java 数据库连接
mybatis中在xml文件中通用查询结果列如何使用
mybatis中在xml文件中通用查询结果列如何使用
20 0
|
18天前
|
XML JavaScript 前端开发
xml文件使用及解析
xml文件使用及解析
|
1月前
|
XML C# 数据格式
使用C#操作XML文件
使用C#操作XML文件
11 0