gpt4 book ai didi

java - GlobalSession 范围的 beans 是否从 spring 5 中删除了?为什么?

转载 作者:行者123 更新时间:2023-11-30 01:55:14 25 4
gpt4 key购买 nike

<强>1。全局 session 范围的 bean 是否从 Spring 5 中删除了?

官方文档不再提及。SCOPE_GLOBAL_SESSION 不再是 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-projects/spring-framework/commit/2b3445df8134e2b0c4e4a4c4136cbaf9d58b7fc4#diff-42e7410c98a33ab499e5c27858b1c985

最佳答案

是的。 SCOPE_GLOBAL_SESSION 用于跨 Portlet 和 Servlet 共享 session 。并且在 Spring 5 中删除了支持的 Portlet SPR-14129因为:

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.

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).

关于java - GlobalSession 范围的 beans 是否从 spring 5 中删除了?为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54742157/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com