在编写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]的更多相关文章

  1. 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 ...

  2. cvc-complex-type.2.3: Element 'beans' cannot have character [children]

    当启动spring的项目时,有时候会抛如下异常: Line 33 in XML document from ServletContext resource [/WEB-INF/backend-serv ...

  3. 万能的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 ...

  4. 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 ...

  5. 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 ...

  6. 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- ...

  7. vc-complex-type.2.3: Element 'filter-mapping' cannot have character [children], because the type's content type is element-only.

    报这种错一般是因为导入的项目或者黏贴的代码中有中文空格或者中文编码,只需将报错代码重写一遍即可.

  8. Element 'plugin' cannot have character [children], because the type's content type is element-only

    原因是你复制的时候,带了一些特殊符号. 解决方案: 将那一串代码复制到notpad++ 或者文本上面,再复制到你的编译器里面,就可以解决问题了

  9. cvc-complex-type.2.3: Element 'dependency' cannot have character [children], because the type's cont

    直接复制网上的pom引入,报错 解决:自己手动输入一遍,不用直接复制,因为复制的时候,项目中编码跟网页上编码不一致,很容易导致出问题.

随机推荐

  1. MINIBASE源代码阅读笔记之HFPage

    HFPage heap file的page的类 成员 slot_t:用来表示页里的slot,包括offset和length slot[]:倒着生长的slot array slotCnt:有多少已用sl ...

  2. 语音性别识别 - 使用R提取特征

    步骤 1)安装R.windows操作系统安装包的链接:https://cran.r-project.org/bin/windows/base/ 2)切换当前路径为脚本所在路径 点击 文件 > 改 ...

  3. ffmpeg 编译graph2dot

    cd ffmpeg ./configure make make tools/graph2dot

  4. Wannafly挑战赛7 E - 珂朵莉与GCD

    题目描述 给你一个长为n的序列a m次查询 每次查询一个区间的所有子区间的gcd的和mod1e9+7的结果 输入描述: 第一行两个数n,m之后一行n个数表示a之后m行每行两个数l,r表示查询的区间 输 ...

  5. Python画一朵花

    from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import Line ...

  6. 【BZOJ 3456】 3456: 城市规划 (NTT+多项式求逆)

    3456: 城市规划 Time Limit: 40 Sec  Memory Limit: 256 MBSubmit: 658  Solved: 364 Description 刚刚解决完电力网络的问题 ...

  7. JMS 基本可靠性机制 和 事务机制

    4.3.1 基本可靠性机制4.3.1.1 控制消息的签收(Acknowledgment) 客户端成功接收一条消息的标志是这条消息被签收.成功接收一条消息一般包括如 下三个阶段:1.客户端接收消息:2. ...

  8. [BZOJ3598][SCOI2014]方伯伯的商场之旅(数位DP,记忆化搜索)

    3598: [Scoi2014]方伯伯的商场之旅 Time Limit: 30 Sec  Memory Limit: 64 MBSubmit: 449  Solved: 254[Submit][Sta ...

  9. JZYZOJ1311 邮局设置问题 dp

    易得每两个点之间建立邮局的最好位置为两点最中间的点,两点之间如果没有奇数个数的点则中间两个点都可以...(自己画一下图可以看出随着右边点的增大最佳点的增大非常平滑...强迫症一本满足)   w[i][ ...

  10. 【最大化平均值】POJ3111-K Best

    [题目大意] 给出v[]和w[],求的最大值. [思路] 二分s(S)的值,可变形为s(S)*Σw>=Σv,所以只需要把求出x*w[i]-v[i],看看前k个的和是否大于等于0,大于等于0就满足 ...