1.Spring
这个问题的原因可能是标签不匹配问题,找了很久的问题才发现beans.xml配置文件中有一个bean元素少了结束标签,以后一定要细心。
异常如下:
Exception in thread "main"
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 71 in XML document from class path resource [beans.xml] is invalid;
nested exception is org.xml.sax.SAXParseException;
lineNumber:71;columnNumber: 47;
cvc-complex-type.2.4.a: 发现了以元素 'bean' 开头的无效内容。
应以
'{"http://www.springframework.org/schema/beans":meta,
"http://www.springframework.org/schema/beans":constructor-arg,
"http://www.springframework.org/schema/beans":property,
"http://www.springframework.org/schema/beans":qualifier,
"http://www.springframework.org/schema/beans":lookup-method,
"http://www.springframework.org/schema/beans":replaced-method,
WC[##other:"http://www.springframework.org/schema/beans"]}' 之一开头。
at ...(省略)