1、singleton
每个Spring容器中的一个Bean定义只有一个对象实例,默认情况会在容器启动的时候初始化Bean,可以指定Bean节点的lazy-init="true"来延缓初始化Bean,
这个时候只有第一次获取bean才会初始化。
<bean id="xxx" class="xxx.xxx" lazy-init="true">
2、prototype
每次从容器获取bean都是新的对象
<bean id="xxx" class="xxx.xxx" scope="prototype">
3、web
request
session
golobal session