第一个异常:
dsdorg.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 183 in XML document from class path resource [ApplicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 183; columnNumber: 26; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'util:map' 的声明。
at org.springframework.context.support.ClassPathXmlApplicationContext.
第二个异常:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 312 in XML document from class path resource [ApplicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 312; columnNumber: 77; cvc-complex-type.2.4.c: 通配符的匹配很全面, 但无法找到元素 'context:property-placeholder' 的声明。
原因:导入名称空间不全
解决方法:导入名称空间
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.2.xsd



