对BeanFactory的初步认识

对BeanFactory的初步认识

对BeanFactory的基本三种实例化
1.

1 InputStream is  = new  FilenInputSteam( " bean.xml " )
2 XmlBeanFactory factory = new  XmlBeanFactory(is);

2.
Resource rs = new  ClassPathResource( " beans.xml " );
BeanFactory factory
= new  XmlBeanFactory(rs);
3.
ApplicationContext ct = new  ClassPathXmlApplication( " beans.xml " );

你可能感兴趣的:(对BeanFactory的初步认识)