Spring—Document root element "beans", must match DOCTYPE root "null"分析及解决方法
网上很多人说要把applicationContex.xml文件中加上如下第二行的<!DOCTYPE/>标签,说明DTD。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
看一下代码,标红处是为了解决标题所出现的报错的。标绿的地方主要是spring的版本问题,需要你找到对应自己版本即可。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd" default-autowire="byName">
Spring—Document root element "beans", must match DOCTYPE root "null"分析及解决方法的更多相关文章
- spring整合xfire出现Document root element "beans", must match DOCTYPE root "null"错误解决方案
fire自带的包下有个spring1.2.6的jar包,而工程的jar包是2.0的. 解决方案: 1.将原配置文件的头schema方式换为DOCTYPE方式,原配置文件如下(非maven) <? ...
- maven项目,去除jar包中的不想要的依赖关系(Document root element "beans", must match DOCTYPE root "null". )
maven dependencies中并不会删除 以下方法maven dependencies中并不会删除,可能程序引入的时候,会去掉这种依赖(猜的) 解释: 就是说项目中要用到某一个a.jar包,通 ...
- Document root element "configuration", must match DOCTYPE root "mapper".
最近剛剛鼓搗mybatis , 第一個demo就出了問題.其實原因是因為將mapper中的頭copy到了configuration里去了 <?xml version="1.0" ...
- Tomcat启动报Error listenerStart错误 | "beans" 必须匹配 DOCTYPE 根 "null" | java.lang.reflect.MalformedParameterizedTypeException
maven打包发布工程时,发布上去却报错FAIL - Deployed application at context path /ch but context failed to start 在服务器 ...
- 文档根元素 "beans" 必须匹配 DOCTYPE 根 "null"
文档根元素 "beans" 必须匹配 DOCTYPE 根 "null" (2011-11-20 21:26:41) 转载▼ 标签: 杂谈 分类: spring- ...
- spring项目的 context root 修改之后,导致 WebApplicationContext 初始化两次的解决方法
修改了 spring web 项目的 context root 为 / 之后,在启动项目时,会导致 WebApplicationContext 初始化两次,下面是其初始化日志: 第一次初始化: 四月 ...
- org.xml.sax.SAXParseException: Failed to read schema document 的原因分析与解决方法
现象: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema documen t 'http://www.s ...
- 在使用 Spring Boot 和 MyBatis 动态切换数据源时遇到的问题以及解决方法
相关项目地址:https://github.com/helloworlde/SpringBoot-DynamicDataSource 1. org.apache.ibatis.binding.Bind ...
- element el-input 自动获取焦点和IE下光标位置解决方法
在实际开发中我们经常会碰到这样的场景,就是有input的地方都喜欢切换过去input自动获取焦点. 如果这个问题是在input中,很容易就实现了,但是element里面的el-input看源码,其实不 ...
随机推荐
- SpringBoot - 实现文件上传1(单文件上传、常用上传参数配置)
Spring Boot 对文件上传做了简化,基本做到了零配置,我们只需要在项目中添加 spring-boot-starter-web 依赖即可. 一.单文件上传 1,代码编写 (1)首先在 stati ...
- 关于base64编码Encode和Decode编码的几种方式--Java
Base64是一种能将任意Binary资料用64种字元组合成字串的方法,而这个Binary资料和字串资料彼此之间是可以互相转换的,十分方便.在实际应用上,Base64除了能将Binary资料可视化之外 ...
- jvm系列五-java内存模型初览(1)
本文转载自:再有人问你Java内存模型是什么,就把这篇文章发给他. 网上有很多关于Java内存模型的文章,在<深入理解Java虚拟机>和<Java并发编程的艺术>等书中也都有关 ...
- 腾讯云TcaplusDB获新加坡MTCS最高等级安全认证
近日,经过国际权威认证机构DNV GL的全面评估审核,TcaplusDB获得了新加坡多层云安全(以下简称"MTCS")T3级最高等级认证,这标志着TcaplusDB全面满足了新加坡 ...
- poj 3304 Segments(解题报告)
收获:举一反三:刷一道会一道 1:思路转化:(看的kuangbin的思路) 首先是在二维平面中:如果有很多线段能够映射到这个直线上并且至少重合于一点,充要条件: 是过这个点的此条直线的垂线与其他所有直 ...
- VJ train1 O-统计问题 题解
原谅我缺少设备,只能手写图解 题目: 在一无限大的二维平面中,我们做如下假设: 1. 每次只能移动一格: 2. 不能向后走(假设 ...
- CF1401-C. Mere Array
CF1401-C. Mere Array 题意: 给出一个长度为\(n\)的数组\(a\),你可以对这个数组进行如下操作:对于数组\(a\)中任意的两个元素\(a_i\).\(a_j\),若\(gcd ...
- 《软件建模与分析》——UML基本概念
UML-基本概念 UML本质上是一种语言,语言的学习离不开基本的单词(元素)和语法(视图.模型)的学习,今天我们就从它们开始. 元素 类图中的关系 控制权限 继承 实现 依赖:一个类A使用到了另一个类 ...
- Docker应用场景和局限性
Docker有哪些好的特性?作为一种新兴的虚拟化方式,Docker跟传统的虚拟化方式相比具有众多的优势.首先, Docker容器的启动可以在秒级实现,这相比传统的虚拟机方式要快得多.其次, Docke ...
- cmder设置方法
一.添加鼠标右键 Cmder.exe /REGISTER ALL 二.添加系统环境变量 我的电脑 > 右键属性 > 高级系统设置 > 环境变量 > 系统变量,在path中添加 ...