-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Impossible to provide a Custom SessionRepository #1406
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
Comments
As stated in the reference manual that you linked, to reuse core Spring Session infrastructure and provide your own The problem you are facing is caused by use of Does this help? |
@vpavic Yes, it helps a lot, it puts me on the good track :) Thanks a lot ! Do you think it would be interesting to propose it as a PR or may be a link somewhere if it's good enough as I saw that other people ask for such a thing ? |
Glad to hear that helped @herveDarritchon. Regarding community extensions, if you decide to create a project around your custom |
Uh oh!
There was an error while loading. Please reload this page.
In a spring-boot context( v2.1.5.RELEASE), I use spring-session (2.1.4.RELEASE) with REDIS. But in our premise infrastructure, REDIS comes with Dynomite from Netflix to do the cross datacenter replication and high availability. And Dynomite doesn’t support PUB/SUB commands.
So we need to write our own custom sessionRepository with no pub/sub commands.
It’s where I have an issue with Spring Boot Autoconfiguration, I should be able to do easily this customization if I trust the documentation (https://docs.spring.io/spring-session/docs/current-SNAPSHOT/reference/html/custom-sessionrepository.html#custom-sessionrepository).
But I failed to do this. I asked questions in Gitter, firstly in Spring-Session with no succes () and after in Spring-Boot, where I have been suggested to raise an issue by Andy Wilkinson @wilkinsona.
please find below some part of our code.
dependencies in a build.gradle
Our configuration class to override the sessionRepository with our custom one
The sessionRepository custom class
When we run our app, we have a collision in the bean because the app finds that the bean session repository is already known.
If we use the bean override configuration of spring-boot :
Spring complains because there are not the same types
I’d like to know the proper way to provide my own implementation of a sessionRepository to Spring and I'd like to know if there is an issue in Spring Session or not ?
from Spring Session gitter :
The text was updated successfully, but these errors were encountered: