ApplicationContext actx=new FileSystemXmlApplicationContext("config.xml");
读取配置报错
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 3 in XML document from file [D:\workspace\myApp\config.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 8; cvc-elt.1: 找不到元素 'beans' 的声明。
xml里加:
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">