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引入,报错 解决:自己手动输入一遍,不用直接复制,因为复制的时候,项目中编码跟网页上编码不一致,很容易导致出问题.
随机推荐
- day4 递归二分法查找
现有一个序列,data=[for i in range(1,5000,3)],现在要求看一个数是否在列表中存在,我们知道,我们可以使用in或__contains__()的方法,判断一个值是否在列表中, ...
- day5模块
模块,用一砣代码实现了某个功能的代码集合. 类似于函数式编程和面向过程编程,函数式编程则完成一个功能,其他代码用来调用即可,提供了代码的重用性和代码间的耦合.而对于一个复杂的功能来,可能需要多个函数才 ...
- 4. CMake 系列 - 项目添加编译选项
目录 1. 项目目录结构 2. 相关代码 2.1 add 模块 2.2 sub 模块 2.3 example 模块 2.4 顶层 CMakeLists.txt 3. 配置&编译 1. 项目目录 ...
- 字符串处理strcpy strcat函数的用法
C语言函数字符串处理strcpy strcat函数的用法: 1)strcat是用来连接两个字符串的,原型是char *strcat(char *dest,char *src),作用是把src所指字符串 ...
- Codeforces Round #393 (Div. 2) (8VC Venture Cup 2017 - Final Round Div. 2 Edition) E - Nikita and stack 线段树好题
http://codeforces.com/contest/760/problem/E 题目大意:现在对栈有m个操作,但是顺序是乱的,现在每输入一个操作要求你输出当前的栈顶, 注意,已有操作要按它们的 ...
- Web开发——服务器端应用技术简单比较
在开发动态网站时,离不开服务器端技术,服务器端技术主要有CGI.ASP.PHP.ASP.NET和JSP. 1.CGI CGI(Common Gateway Interface 通用网关接口)是最早用来 ...
- elementUI 学习入门之 container 布局容器
Container 布局容器 用于布局的容器组件,方便快速搭建页面基本结构 <el-container> : 外层容器.当子元素包含 <el-header> 或 <el- ...
- js中箭头函数和普通函数this的区别
最近在学习angularJs的时候由于里面涉及到了箭头函数,箭头函数除了声明上有点区别以外,和普通函数最主要的区别还是在this的问题上. Js中函数中嵌套的函数this不会 “继承”.比如说以下代码 ...
- platform 模块
python中,platform 模块给我们提供了很多方法去获取操作系统的信息,如: import platform platform.platform() #获取操作系统名称及版本号 'Window ...
- 使用JDBC连接数据库的一些BUG
题记:前几天用JDBC连接MYSQL数据库的时候,出现了一些BUG,有代码层次的,也有设置层次的, 下面的解决方法时我目前所遇到的,后期如果还有遇到的会进行补充. 一.出现:远程mysql_java. ...