首页 > 代码库 > 实例化bean

实例化bean

1,使用工厂方法实例化bean

<bean id="personService2" class="com.maple.service.impl.PersonServiceBeanFactory"     factory-method="createPersonServiceBean"></bean>          <bean id="personServiceFactory" class="com.maple.service.impl.PersonServiceBeanFactory"></bean>     <bean id="personService3" factory-bean="personServiceFactory"     factory-method="createPersonServiceBean2"></bean>

 

实例化bean