开发者社区 问答 正文

Spring 2.x中针对WebApplicationContext新增的作用域是什么?

Spring 2.x中针对WebApplicationContext新增的作用域是什么?

展开
收起
真的很搞笑 2021-10-27 22:34:21 357 分享 版权
1 条回答
写回答
取消 提交回答
  • Spring 2.x中针对WebApplicationContext新增了3个作用域,分别是:request(每次HTTP请求都会创建一个新的Bean)、session(同一个HttpSession共享同一个Bean,不同的HttpSession使用不同的Bean)和globalSession(同一个全局Session共享一个Bean)。

    2021-10-27 22:34:43
    赞同 展开评论