Spring Bean的生命周期
Bean的生命周期默认为singleton(单例模式),即每次取到的对象都是一样的。
Bean的生命周期有三种模式:
singleton,prototype,rquest,session,global session。
参考:spring-framework-2.5.6-with-dependencies\spring-framework-2.5.6\docs\reference\html_single\index.html 中的3.4章节。
本文介绍了Spring框架中Bean的生命周期,默认情况下Bean采用单例模式。详细解释了singleton、prototype等五种不同的作用域,并提供了官方文档的参考链接。
1438

被折叠的 条评论
为什么被折叠?



