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">
相關文章
相關標籤/搜索