1.单例模式(Spring默认机制):
<bean id="accountService"
class="com.foo.DefaultAccountService"
scope="singleton"/>
2.原型模式:每次从容器中get的时候都会创建一个新的对象
<bean id="accountService"
class="com.foo.DefaultAccountService"
scope="prototype"/>
3.其余的request,session,application这些只在web开发中使用到