Reputation: 730
I recently implement Spring Session.
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session</artifactId>
<version>1.0.2.RELEASE</version>
</dependency>
I make my own implementation of the sessionRepository, so when the session is created I configure the setMaxInactiveIntervalInSeconds with 60 seconds. If I debug this code the session object has the correct max inactive interval, but If I wait on the website without make anything, the session never expires.
Any idea to fix this? Thanks
public class SpringSessionRepository implements SessionRepository<ExpiringSession> {
@Override
public ExpiringSession createSession() {
ExpiringSession result = new MapSession();
result.setMaxInactiveIntervalInSeconds(60);
return result;
}
...
}
Upvotes: 1
Views: 1056
Reputation: 730
The current version of spring session doesn't support expiration configuration.
Here is the issue on github: https://github.com/spring-projects/spring-session/issues/106
Upvotes: 0