Spring配置文件出错

问题描述

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

解决方案

配置文件中的beans节点下面只能是元素节点,不能有字符或文本存在。

比如多余的标点符号,点,也有可能是空格。

所以将9到12行注释成这样就行了;

<!--
//1.property表示给成员变量(属性)赋值
//2.调用set方法
//3.name表示属性名
//4.ref表示bean的id名
-->

posted @ 2019-08-14 13:32  贰零一八  阅读(138)  评论(0编辑  收藏  举报