Spring 异常解决办法

Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in XML document from class path resource [applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 69; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'context:property-placeholder' 的声明。

原因:spring beans的配置文件context命名空间没导入全
解决办法:
context:命名空间:

xmlns:context=”http://www.springframework.org/schema/context”

xsi:schemaLocation:

http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd

展开阅读全文

没有更多推荐了,返回首页