是否从 spring 5 中删除了 GlobalSession 范围的 bean?为什么? [英] Were GlobalSession scoped beans removed from spring 5? Why?

查看:53
本文介绍了是否从 spring 5 中删除了 GlobalSession 范围的 bean?为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

1.是否从 Spring 5 中删除了全局会话作用域 bean?

官方文档不再提及.SCOPE_GLOBAL_SESSION 不再是 RequestAttributes 的一部分:

Official documentation no longer mentions it. SCOPE_GLOBAL_SESSION is no longer part of RequestAttributes:

Spring 4:https://docs.spring.io/autorepo/docs/spring/4.2.4.RELEASE/javadoc-api/org/springframework/web/context/request/RequestAttributes.html#SCOPE_GLOBAL_SESSION

Spring 5:https://docs.spring.io/autorepo/docs/spring/current/javadoc-api/org/springframework/web/context/request/RequestAttributes.html#SCOPE_GLOBAL_SESSION

2.如果 1 为真:为什么要删除它们?


更新:

找到一个删除内容的提交.似乎是因为删除了 Portlet:请参阅提交:https://github.com/spring-framework/commit/2b3445df8134e2b0c4e4a4c4136cbaf9d58b7fc4#diff-42e7410c98a33ab499e5c27858b1c985

Found a commit that removes the stuff. Seems it is because of dropping of Portlet: See commit : https://github.com/spring-projects/spring-framework/commit/2b3445df8134e2b0c4e4a4c4136cbaf9d58b7fc4#diff-42e7410c98a33ab499e5c27858b1c985

推荐答案

是的.SCOPE_GLOBAL_SESSION 用于跨 Portlet 和 Servlet 共享会话.并且 Portlet 支持在 Spring 5 中在 SPR-14129 中被删除,因为:

Yes. That SCOPE_GLOBAL_SESSION is for sharing session across Portlets and Servlets. And Portlet supported is removed in Spring 5 in SPR-14129 because of :

Spring 的 Portlet MVC 支持在近年来,从未更新到现代Servlet MVC 基于的 HandlerMethod 基础设施(从 3.1 开始,旧的 Servlet MVC 变体已被弃用3.2).此外,Portlet 3.0 规范打算引入注释驱动调度本身,因此没有战略位置对于 Spring Portlet MVC,即使在其目前的细分市场中也是如此.最后但同样重要的是,常见的 Portlet 环境似乎都停留在 Spring 上3.x,甚至还没有升级到 Spring 4.x.

Spring's Portlet MVC support turned into a second-class feature in recent years, never having been updated to the modern-day HandlerMethod infrastructure that Servlet MVC is based on these days (since 3.1 already, with the old Servlet MVC variant deprecated since 3.2). Furthermore, the Portlet 3.0 specification intends to introduce annotation-driven dispatching itself, so there is no strategic place for Spring Portlet MVC either, even within its present niche. And last but not least, common Portlet environments seem to be stuck on Spring 3.x, not even upgrading to Spring 4.x yet.

因此,从 Spring 5 开始,我们将完全放弃 Portlet MVC 支持,同时介绍我们的 Reactive MVC 变体.我们打算继续支持(但不推荐)在 JSF 中使用 Spring在 Portlet 环境中,特别是通过 Spring Web Flow.对于所有其他用途,Spring Framework 4.3.x 将继续受支持,直到2020,包括其 Portlet MVC 支持(以及底层 Servlet 2.5支持).

We will therefore drop Portlet MVC support completely as of Spring 5, while at the same time introducing our Reactive MVC variant. We intend to keep supporting (but not recommending) the use of Spring with JSF in a Portlet environment, in particular through Spring Web Flow. For all other purposes, Spring Framework 4.3.x will remain supported until 2020, including its Portlet MVC support (and underlying Servlet 2.5 support).

这篇关于是否从 spring 5 中删除了 GlobalSession 范围的 bean?为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆