<!-- 第一种普通创建方法
scope:作用域 prototype:每次都是新的
-->
<bean id="personService" class="com.clannan.service.impl.PersonServiceBean" scope="singleton" init-method="init" destroy-method="destroy">
<property name="personDao" ref="personDao"></property>
</bean>
<!--<bean id="personService1" class="com.clannan.service.impl.PersonServiceBeanFactory" factory-method="createPersonServiceBean" lazy-init="false" init-method="init" destroy-method="destroy"></bean>
-->
<!-- 第二种 静态工厂 -->
<bean name="personService1" class="com.clannan.service.impl.PersonServiceBeanFactory" factory-method="createPersonServiceBean"></bean>
<!-- 第三种,实例工厂方法 -->
<!--<bean id="personServicebeanFactory" class="com.clannan.service.impl.PersonServiceBeanFactory"></bean>
<bean id="personService2" factory-bean="personServicebeanFactory" factory-method="createnewPersonServiceBean"></bean>
-->