在编写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. 语音性别识别 - 使用R提取特征

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

  2. Technology share: VR is coming,are you ready?

    ►Date 2016-10-18 ►Address 上海市浦东新区严家桥1号宏慧音悦湾3号楼5楼 VR SPACE ►Events 品牌如何抢先一步,借玩VR吸引眼球,如何让客户作为VR买单? 如何结 ...

  3. LoadRunner中Vugen-Recording Options选项卡介绍:

    LoadRunner中Vugen-Recording Options选项卡介绍:

  4. platform 模块

    python中,platform 模块给我们提供了很多方法去获取操作系统的信息,如: import platform platform.platform() #获取操作系统名称及版本号 'Window ...

  5. chomd 1+2+4

    2,把目录 /tmp/sco修改为可写可读可执行 chmod 777 /tmp/sco 要修改某目录下所有的文件夹属性为可写可读可执行 chmod 777 * 把文件夹名称用*来代替就可以了 要修改/ ...

  6. 行转列之后的datagrid的保存

    行专列之后,查询的存储过程为 1 USE [APS_Future_FT] 2 GO 3 /****** Object: StoredProcedure [dbo].[P_APS_H_InternalS ...

  7. [BZOJ3143][HNOI2013]游走(期望+高斯消元)

    3143: [Hnoi2013]游走 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 3576  Solved: 1608[Submit][Status ...

  8. [HDU5492]Find a path

    题目大意: 一个n*m的格子,每个格子上都有一个数. 你可以向下或者向右走,从(1,1)走到(n,m),问方差*(n+m-1)最小的路径是哪个? 思路: 方差*(n+m-1)就相当于给格子里每个数乘上 ...

  9. 【8.22校内测试】【数学】【并查集】【string】

    今天的t2t3能打出来80分的暴力都好满足啊QwQ.(%%%$idy$ 今天的签到题,做的时候一眼就看出性质叻qwq.大于11的所有数分解合数都可以用4.6.9表示,乱搞搞就可以了. #include ...

  10. Java获取Access数据库连接单例简单实例

    Java在连接Access数据库时比较方便,不用导入第三方的jar包,jdk中内置的odbc可以完成Access数据库的访问,需要注意的是,我们首先要配置Access数据库的数据源,还要区分x86和x ...