spring加载application.xml异常

Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 37; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但没法找到元素 'context:annotation-config' 的声明。spring


解决办法:在application.xml命名空间中加上这两个解决。app

xsi:schemaLocation="http://www.springframework.org/schema/context  http://www.springframework.org/schema/context/spring-context.xsd">
相关文章
相关标签/搜索