`

断网运行jar包加载spring文件时,提示cvc-elt.1: Cannot find the declaration of element 'beans'.

 
阅读更多
头疼的spring加载问题:

断网运行jar包加载spring文件时,提示cvc-elt.1: Cannot find the declaration of element 'beans'.

在网上搜索N种方法,最后发现适合我自己程序的是该方法:
替换文件头部
源文件头部
<?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"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">


替换后
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING/DTD BEAN/EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>



当然网上嗨有其他方法可以使用的方法,但是觉得不是好的办法
将spring的目录org放到本地web服务的根目录中,使用本地IP访问,如:
<?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"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://192.168.11.23/org/springframework/beans/factory/xml/spring-beans-3.0.xsd">
分享到:
评论

相关推荐

    spring配置文件解析失败报”cvc-elt.1: 找不到元素 &#39;&#39;beans&#39;&#39; 的声明”异常解决

    当遇到“cvc-elt.1: 找不到元素 'beans' 的声明”这种异常时,通常意味着Spring在尝试解析XML配置文件时遇到了问题。这个错误提示表明XML解析器无法找到`&lt;beans&gt;`元素的定义,这是一个基本的Spring配置文件结构元素...

    dubbo找不到dubbo.xsd报错

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    spring5 SAXParseException:cvc-elt.1: 找不到元素“beans 的声明详解

    然而,有时在尝试解析这些配置文件时,可能会遇到`SAXParseException`,错误信息显示为`cvc-elt.1: 找不到元素“beans”的声明`。这个错误通常意味着Spring无法找到预期的根元素`&lt;beans&gt;`,这是Spring配置文件的基础...

    cvc-complex-type.2.4.d: Invalid content was found

    在XML Schema设计中,"cvc-complex-type.2.4.d: Invalid content was found" 是一个常见的错误信息,这通常意味着在解析XML文档时,遇到了不符合定义的复杂类型的内容。这个错误通常涉及到XML Schema的约束规则,即...

    解决:dubbo找不到dubbo.xsd报错

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    spring xsd文件

    在Spring框架中,XSD文件用于定义XML配置文件的结构和规则,确保配置文件的语法正确性,使得Spring容器能够正确解析和加载配置。 描述中的错误 "cvc-complex-type.2.4.a: Invalid content was found starting with ...

    spring-mvc-3.0.xsd

    cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:resources' 报错

    dubbo.xsd文件下载

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document 'http:// code....

    springmodules-cache.xsd&springmodules-ehcache.xsd.rar

    cvc-complex-type.2.4.a: Invalid content was found starting with element 'page-encoding'. One of '{"http:// java.sun.com/xml/ns/javaee":include-prelude, ...

    urlrewritefilter-4.0.3.jar

    本篇将详细介绍`URLRewriteFilter-4.0.3.jar`及其配置文件`web.xml`和`urlrewrite.xml`的应用。 `URLRewriteFilter`是Tuckey组织提供的一个基于Servlet Filter的URL管理工具,它主要处理HTTP请求的URL,根据预定义...

    dubbo.xsd文件资源

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    最完整的CVC-ClinicDB数据集

    CVC-ClinicDB 是MICCAI 2015 结肠镜视频自动息肉检测子挑战赛训练阶段的官方数据集。该数据库由从结肠镜检查视频中提取的612张静态图像组成,这些图像来自29个不同的序列。每张帧图像都附带有一个真值(ground truth...

    javascript经典例子

    JavaScript,作为一种广泛应用于网页和互联网应用的编程语言,拥有丰富的特性和功能,是现代Web开发不可或缺的一部分。在JavaScript经典例子中,我们可以探索并学习到许多关键概念和技术,这些概念和技术对于理解和...

    解决dubbo找不到dubbo.xsd报错

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    dubbo.xsd 约束文件 解决标签识别报红

    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...

    BPMN2新规范 中文版

    当流程执行到UserTask时,系统会等待用户的输入或操作完成。 - **ManualTask**:指那些无法或没有必要自动化的线下操作,如货物打包或发货。 - **ServiceTask**:服务任务是指流程中调用外部服务或内部服务API的任务...

    Activiti 学习笔记七:连线(SequenceFlow)

    4. 验证与测试:设计完成后,可以使用 Activiti 的API或工作流引擎进行模拟运行,检查流程是否按照预期进行。 四、SequenceFlow的应用场景 1. 逻辑分支:SequenceFlow 可以与决策网关配合,实现基于不同条件的流程...

    计算机视觉中心-01行人数据集(CVC-01PedestrianDataset).pdf

    计算机视觉中心-01行人数据集(CVC-01PedestrianDataset) 计算机视觉中心-01行人数据集(CVC-01PedestrianDataset)是一种用于评估行人检测算法的数据库,该数据库记录了巴塞罗那周围的行人数据,并由CVC ADAS小组...

    CVC-T Endoscene 息肉数据集

    CVC-T 数据集是一个更广泛的数据集的测试集,称为 Endoscene。CVC-T 由从 36 名患者获得的 44 个视频序列中获得的 60 张图像组成。 一度找不到这个单独的数据集,但其实是包含在一整个医学分割网络的训练策略里的,...

Global site tag (gtag.js) - Google Analytics