1.spring容器的基本用法
xml配置
<bean id="myTestBean" class="bean.MyTestBean"/>
调用
BeanFactory bf = new XmlBeanFactory(new ClassPathResource("beanFactoryTest.xml")); MytestBean bean = (MyTestBean) bf.getBean("myTestBean");