spring基础----Bean的Scope

Scope: Spring容器如何新建Bean实例。 eg:@Scope("prototype")

有以下几种:

1、Singleton:单例,默认配置

2、Prototype: 每次调用新建一个Bean

3、Request: 给每一个http request 新建一个Bean

4、Session:给每一个http session新建一个Bean

5、GlobalSession:

猜你喜欢

转载自www.cnblogs.com/lzhirong/p/9246267.html