Element 'beans' cannot have character [children]
在编写spring的applicationContext.xml文件时,出现了:
Element 'beans' cannot have character [children], because the type's content type is element-only.错误。
错误原因:Spring在初始化的时候无法识别applicationContext.xml中的元素。
可能产生该错误的原因:网上复制的代码直接粘贴到了xml文件中,而网上的代码可能不符合xml规范,而在ide里面又完全看不出来什么问题!
当把applicationContext.xml文件的内容copy到notepad++里面,问题发现了:
就是这些从网页上直接复制下来的眼睛看不到的字符导致了这个错误!
要是看不出来改一下编码格式,如ANSI编码!
Element 'beans' cannot have character [children]的更多相关文章
- Springs Element 'beans' cannot have character [children], because the type's content type is element-only
Springs Element 'beans' cannot have character [children], because the type's content type is element ...
- cvc-complex-type.2.3: Element 'beans' cannot have character [children]
当启动spring的项目时,有时候会抛如下异常: Line 33 in XML document from ServletContext resource [/WEB-INF/backend-serv ...
- 万能的ctrl+shift+F(Element 'beans' cannot have character [children], because the type's content type is element-only.错误)
今天在spring-servlet.xml文件中出现了一个莫名其妙的错误:Element 'beans' cannot have character [children], because the t ...
- Element 'beans' cannot have character [children], because the type's content type is element-only
这个小问题快搞死我了,找了大半个小时. Element 'beans' cannot have character [children], because the type's content typ ...
- xml文件报Element 'beans' cannot have character [children],because the type's content type is element
写springMvc.xml文件时,偶然遇到 Element 'beans' cannot have character [children],because the type's content t ...
- Element 'dependencies' cannot have character[children],because the type's content type is elemen
问题描述: Element 'xxxxxxx' cannot have character [children],because the type's content type is element- ...
- vc-complex-type.2.3: Element 'filter-mapping' cannot have character [children], because the type's content type is element-only.
报这种错一般是因为导入的项目或者黏贴的代码中有中文空格或者中文编码,只需将报错代码重写一遍即可.
- Element 'plugin' cannot have character [children], because the type's content type is element-only
原因是你复制的时候,带了一些特殊符号. 解决方案: 将那一串代码复制到notpad++ 或者文本上面,再复制到你的编译器里面,就可以解决问题了
- cvc-complex-type.2.3: Element 'dependency' cannot have character [children], because the type's cont
直接复制网上的pom引入,报错 解决:自己手动输入一遍,不用直接复制,因为复制的时候,项目中编码跟网页上编码不一致,很容易导致出问题.
随机推荐
- linux中忘记root密码解决方案
方法一: 如果用户具有sudo权限,那么直接可以运行如下命令: #sudo su root #passwd #更改密码 或者直接运行sudo passwd root命令就可以直接更改root密码. 有 ...
- 未能加载文件或程序集“System.Data.SQLite”
未能加载文件或程序集“System.Data.SQLite”或它的某一个依赖项.试图加载格式不正确的程序. 说明: 执行当前 Web 请求期间,出现未经处理的异常.请检查堆栈跟踪信息,以了解有关该错误 ...
- 三 Python解释器
当我们编写Python代码时,我们得到的是一个包含Python代码的以.py为扩展名的文本文件.要运行代码,就需要Python解释器去执行.py文件. 由于整个Python语言从规范到解释器都是开源的 ...
- 爱奇艺全国高校算法大赛初赛A
$01$背包. 数据范围:物品个数小于等于$3000$,背包大小小于等于$1000000$. $map<int,long long>dp$,用$map$去做$dp$,可以少遍历很多状态,可 ...
- Blob和Clob在JDBC中的简介
数据库在当今的应用越来越广泛了,同样伴随着领域的广泛,存储的内容也不在是只有数值.字符.boolean几种类型,而是越来越多样化.在这样的前提下就出现了Blob和Clob两个类型.下面我将对这个两个类 ...
- XV6操作系统代码阅读心得(二):进程
1. 进程的基本概念 从抽象的意义来说,进程是指一个正在运行的程序的实例,而线程是一个CPU指令执行流的最小单位.进程是操作系统资源分配的最小单位,线程是操作系统中调度的最小单位.从实现的角度上讲,X ...
- 【Java】SpringBoot入门学习及基本使用
SpringBoot入门及基本使用 SpringBoot的介绍我就不多说了,核心的就是"约定大于配置",接下来直接上干货吧! 本文的实例: github-LPCloud,欢迎sta ...
- mySQL 的 2个分类
1.将如下表中的每门成绩都大于80分的人名? 张三 语文 81 张三 数学 75 李四 语文 76 李四 数学 90 王五 语文 81 王五 数学 100 王五 英语 90 select * from ...
- PHP视频教程 字符串处理函数(三)
字符串替换函数: str_replace() 替换字符串或数组元素,区分大小,第四个参数可选用于统计替换次数. str_ireplace() 不区分大小写替换 字符串函数比较 strcmp()比较字符 ...
- codevs 1058 合唱队形 2004年NOIP全国联赛提高组
1058 合唱队形 2004年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description N位同学站成一排,音 ...