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

在修改springMVC的spring-mvc.xml配置时出现这个问题:cvc-complex-type.2.3: Element ‘beans’ cannot have character [children], because the type’s content type is element-only.

很奇怪,说是bean标签缺失,看了一下,没问题啊,就根据所提示的行找到对应的问题,原因就在于,这些配置是我从别的地方拷贝过来的,把这些配置删除,就不报错了。
解决方法,把拷贝过来的数据放到notpad++中,查看编辑的格式和字符集,删除多余的空格,然后再粘到springmvc.xml中,或者最简单的方法,就是全部手敲一遍即可

发布了168 篇原创文章 · 获赞 13 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/G_whang/article/details/103174602