-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Restructure Redis HttpSession configuration support #2123
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
Conversation
be49463
to
7916f8f
Compare
7916f8f
to
6c8fd80
Compare
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 for the PR @vpavic! Overall it looks good. Can you please rebase and add documentation for the new annotations?
This reverts commit 8582b97 See spring-projectsgh-2122
This commit restructures configuration support for Redis-backed HttpSession with aim to enable users to easily select the SessionRepository implementation they prefer to use. This is achieved by introducing [at]EnableRedisIndexedHttpSession annotation that can be used to configure RedisIndexedSessionRepository, while the existing [at]EnableRedisHttpSession will going forward configure RedisSessionRepository as the SessionRepository implementation used by Spring Session. Additionally, this also introduces AbstractRedisHttpSessionConfiguration as the base configuration class that manages common aspects of Redis-backed HttpSession support, which is then extended by more specific configuration classes that provide specific SessionRepository implementation. Closes spring-projectsgh-2122
6c8fd80
to
e1757d2
Compare
I've rebased the PR on top of the current I considered the documentation updates while putting the PR together, however with all the changes that happened during the lifecycle of 2.x (that were unfortunately not documented in timely manner) and now these changes I feel that the docs are better addressed via #1010 as a part of larger overhaul. That's one topic I believe we should discuss when we jump on the next sync. In the meantime, I wouldn't hold this up, especially since spring-projects/spring-boot#32205 is likely to get merged soon as well. |
This PR reverts 8582b97 and restructures configuration support for Redis-backed
HttpSession
with aim to enable users to easily select theSessionRepository
implementation they prefer to use.This is achieved by introducing
@EnableRedisIndexedHttpSession
annotation that can be used to configureRedisIndexedSessionRepository
, while the existing@EnableRedisHttpSession
will going forward configureRedisSessionRepository
as theSessionRepository
implementation used by Spring Session.Additionally, this also introduces
AbstractRedisHttpSessionConfiguration
as the base configuration class that manages common aspects of Redis-backedHttpSession
support, which is then extended by more specific configuration classes that provide specificSessionRepository
implementation.Closes #2122