-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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 support for auto-configuring an indexed reactive session repository #42604
Comments
Thanks for the report. The missing support for As far as I can tell, Line 57 in 8704448
This functionality was added when we started supporting reactive in Spring Boot 2.0. Can you please clarify what you believe to be missing from the reactive session support beyond |
That config works when the default reactive redis session repository is used, but since to use the indexed one you have to use the @EnableRedisIndexedWebSession annotation it's ignored and uses the configurations provided in the annotation. I'll clarify that this affects only the reactive indexed repository |
I've opened #42834 to look at improving the properties so that it's clearer which properties apply in which situations. |
As noted in the Spring Session configuration documentation, reactive indexed repositories can only be enabled through annotations, which limits the configuration flexibility via application.properties.
https://docs.spring.io/spring-session/reference/configuration/redis.html
https://docs.spring.io/spring-session/reference/configuration/reactive-redis-indexed.html
Additionally, the auto-configuration classes do not account for important properties such as configureRedisAction and namespace.
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisSessionConfiguration.java
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/RedisReactiveSessionConfiguration.java
Simply adding the equivalent methods resolves this issue, as shown in the following configuration:
Additionally, it would be helpful to add a similar check for non-indexed repositories when the cleanup-cron property is enabled.
I can provide a PR if needed
The text was updated successfully, but these errors were encountered: