-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Add configuration-strategy
property to RedisSessionProperties to configure ConfigureRedisAction
#17022
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
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 again for the PR. I don't think action
is the right term for this and I've made a few suggestions. Flagging for team attention to see what the rest of the team thinks.
/** | ||
* Allows specifying a strategy for configuring and validating Redis. | ||
*/ | ||
private RedisAction action = RedisAction.NOTIFY_KEYSPACE_EVENTS; |
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.
The interface is quite generic and allows the user to do anything they want to configure and validate the connection. I don't think "action" is the right term for this as what we set is a "configuration and validation strategy".
configurationStrategy
is a bit mouthful but more explicit perhaps?
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.
Having in mind the purpose of ConfigureRedisAction
, naming this property configurationStrategy
would be more appropriate.
/** | ||
* Allows specifying a strategy for configuring and validating Redis. | ||
*/ | ||
public enum RedisAction { |
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.
ConfigurationStrategy
would be the logical name there but it fees a bit odd so a bit more brainstorming is required I think.
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.
I'd hold this off for a while because we at the Spring Session side should probably take a closer look at our support for configuring ConfigureRedisAction
.
action
property to RedisSessionProperties to configure ConfigureRedisAction
configuration-strategy
property to RedisSessionProperties to configure ConfigureRedisAction
90ba85a
to
866f97c
Compare
3fde228
to
2f1f353
Compare
…nfigure `ConfigureRedisAction`. see spring-projectsgh-16943
Add a new property to `RedisSessionProperties` that allows the default `ConfigureRedisAction` to be changed. Users can still also configure the action using a `@Bean`. See gh-17022
Thanks for another contribution @nosan! I went back and forth on the property name a few times and ended up with @snicoll Let me know if you think the name might still be a problem. We still have time to refine it. |
Sorry @vpavic, I missed this comment until it was too late. Hopefully whatever changes you've got in mind won't be too hard to apply to the auto-configuration once they're ready. Is there a Spring Session issue we should be tracking? |
No problem @philwebb. I've opened spring-projects/spring-session#1458 to consider doing something about this on Spring Session side. |
see gh-16943