New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ContinueRequestSessionInformationExpiredStrategy #14765
base: main
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,35 @@ | |||
/* | |||
* Copyright 2002-2016 the original author or authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make sure that the copyright notice includes the current year?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I changed
* A {@link SessionInformationExpiredStrategy} continues to execute subsequent filters | ||
* even after session expiration. | ||
* | ||
* @author Rosie Yang |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add @since 6.3
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I changed too. I realized I need to pay more attention to contribution rules, sorry about that.
/** | ||
* Creates a new instance | ||
* @param sessionInformation the SessionInformation that is expired | ||
* @param request the HttpServletRequest | ||
* @param response the HttpServletResponse | ||
*/ | ||
public SessionInformationExpiredEvent(SessionInformation sessionInformation, HttpServletRequest request, | ||
HttpServletResponse response) { | ||
HttpServletResponse response, FilterChain filterChain) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of changing this constructor, a new constructor should be created accepting all those parameter + the FilterChain
. The reason is because if we change this constructor it will be a breaking change for anyone that is using SessionInformationExpiredEvent
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you mentioned, I add new constructor below original constructor. But filterChain value need for new constructor i had to handle this in original constructor too.
- continues to execute subsequent filters even after session expiration. - Issue spring-projects#14077
Description
This PR adds a ContinueRequestSessionInformationExpiredStrategy to contiue next filters even though the session expired.
Changes
Issue #14077