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 type is element-only

这个错误一般是由于xml配置文件中有编码问题(可能是由于从网页拷贝数据到文本导致的编码不一致)。

尝试将出问题的xml中的文本重新输入一遍,一般会解决这种问题。、

我后来复制到txt文件中,然后再一段一段的拷贝过来,才发现的。原来我注释的时候多了一行“- ->”

原文地址:https://www.cnblogs.com/hero123/p/9097511.html