public ClassPathXmlApplicationContext(String fileName) throws Exception{
SAXReader reader = new SAXReader();
Document document = reader.read(this.getClass().getClassLoader().getResourceAsStream(fileName));
List<Element> elements = document.selectNodes("/beans/bean");
for (Element e : elements) {
String id = e.attributeValue("id");
String value = e.attributeValue("class");
Object o = Class.forName(value).newInstance();
beans.put(id, o);
}
}
这句话什么意思?哪位大神可以仔细的解答下,用到了Java哪部分的知识
Document document = reader.read(this.getClass().getClassLoader().getResourceAsStream(fileName));