创建lifebean的时候,增加两个方法
关闭时会调用destroy方法
@Test
public void testInstanceFactory(){
Book book = (Book) ioc.getBean("instanceBook");
System.out.println(book);
}
@Test
public void testMyFactoryBean(){
Book book = (Book) ioc.getBean("myFactoryBean");
System.out.println(book);
}