<!--
<bean id="bean2" class="org.doucun.spring.Bean2" scope="singleton"/>
-->
<bean id="bean2" class="org.doucun.spring.Bean2" scope="singleton"/>
-->
<bean id="bean2" class="org.doucun.spring.Bean2" scope="prototype"/>
scope可以取值:
1、singleton:每次调用getBean时返回相同的实例
2、prototype:每次调用getBean时返回不同的实例