-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
maxInactiveInterval from JdkMongoSessionConverter is always from MongoSession #2910
Comments
Hi @Lucasark. The |
@marcusdacoregio If I just write this:
JdkMongoSessionConverter parameter is same of nothing, is not used. I need explicit in EnableMongoHttpSession, even the JdkMongoSessionConverter require 1 parameter |
I recognized the same behavior with the ReactiveMongoSessionRepository and I think the problem is that the MongoSession will be created with a constructor without interval, and AFTERWARDS the maxInactiveInterval will be set. But the constructor already called the To keep it short, every session will have a expireAt date of creationDate + 30m after construction. Setting the maxInteractiveInterval will only have an effect on later A simple solution would be to use directly the constructor with sessionIdGenerator and maxInactiveInterval instead of calling the constructor without maxInactiveInterval and calling all the setters afterwards. Code in the ReactiveMongoSessionRepository:
Constructor:
|
spring-session/spring-session-data-mongodb/src/main/java/org/springframework/session/data/mongo/JdkMongoSessionConverter.java
Line 66 in a6b97e5
This attrb is required for create JdkMongoSessionConverter, however is never used to set in the interval.
I know I can set this interval from "@EnableMongoHttpSession", but it is can make confusing when read the documentation
The text was updated successfully, but these errors were encountered: