小菜鸟学 Spring-bean scope (一)
来源:互联网 发布:常见网络诈骗 编辑:程序博客网 时间:2024/04/28 07:14
this information below just for study record of mine.
默认情况下:Spring 创建singleton bean 以便于错误能够被发现。
延迟加载:延迟加载可以使bean 在被需要的时候实例化
Bean Scope
singleton : Scopes a single bean definition to a single object instance per Spring IoC container.
To put it another way, when you define a bean definition and it is scoped as a singleton, the Spring IoC container creates exactly one instance of the object defined by that bean definition. This single instance is stored in a cache of such singleton beans, and all subsequent requests and references for that named bean return the cached object.
prototype: Scopes a single bean definition to any number of object instances
request: Scopes a single bean definition to the lifecycle of a single HTTP request
session: Scopes a single bean definition to the lifecycle of an HTTP
Session
global session:
Scopes a single bean definition to the lifecycle of a global HTTP Session
this come from http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/beans.html#beans-factory-scopes
if there are some copyright or problem happened ,please contact me.
zbwork000@163.com
- 小菜鸟学 Spring-bean scope (一)
- Spring 中的 Bean Scope
- Spring Bean的Scope
- Spring bean scope
- spring bean scope
- spring bean scope属性
- spring bean scope
- Spring bean scope
- spring bean属性scope
- Spring bean scope
- Spring Bean Scope
- Spring Bean scope种类
- spring bean的scope
- Spring Bean的Scope
- Spring Bean的scope
- spring bean的scope
- 小菜鸟学 Spring-Dependency injection(二)
- 小菜鸟学 MQ(一)
- ort_tasks.c
- L4 Fiasco调度结构
- 通向架构师的道路(第二十四天)之Oracle性能调优-朝拜先知之旅
- 使用HQL查询符合条件的前n行语句
- 求助
- 小菜鸟学 Spring-bean scope (一)
- 通向架构师的道路(第二十五天)SSH的单元测试与dbunit的整合
- ort_pools.c
- 《Maven实战》
- cocos2d-x游戏主要逻辑和结构
- 通向架构师的道路(第二十六天)漫谈架构与设计文档的写作技巧
- JavaMail
- ort_omp.c
- XSD文件格式