org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 82 in XML document from

最近在学习spring的时候遇到了util名称空间的问题

问题描述如下:

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 82 in XML document from class path resource [ioc2.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 82; columnNumber: 26; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 ‘util:map’ 的声明。

解决问题:

原因是没有正确的配置util引用资源,在xml文件下应添加如下配置:

xmlns:util=“http://www.springframework.org/schema/util”
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.0.xsd

将上述代码添加到此处

在这里插入图片描述
问题就解决了

猜你喜欢

转载自blog.csdn.net/MarkusZhang/article/details/104460748
今日推荐