代码如下时:
public class springStudy {
public static void main(String[] args) {
ApplicationContext ctx = new ClassPathXmlApplicationContext("bean.xml");//读取bean.xml中的内容
Person p = ctx.getBean("person",Person.class);//创建bean的引用对象
p.info();
}
}
调用的spring标黄部分源码:
public InputStream getInputStream() throws IOException {
InputStream is;
if (this.clazz != null) {
is = this.clazz.getResourceAsStream(this.path);
}
else {