报错如下
Element 'project' 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.
可能的原因
配置文件中Beans节点下只能是元素节点,不可有多余字符或文本存在,也可能是多余的空格。
- 可能由于复制操作,产生了不可见字符;
- 也可能由于不小心按到了键盘上的按键,在标签外产生了多余的字符。
解决方法
查找文件中的多余文本字符,删除即可(空行不影响)