Spring Why session get expired before session-timeout?

喜你入骨 提交于 2019-12-11 12:38:50

问题


I am using Spring security authentication and after successful logis is session set. I have configured session-timeout on 10 minutes, but session is removed after few minutes. I don't know why.

Here is debug output:

2013-09-13 12:34:29 DEBUG HttpSessionEventPublisher:83 - Publishing event: org.springframework.security.web.session.HttpSessionDestroyedEvent[source=org.apache.catalina.session.StandardSessionFacade@5d67c24a]
2013-09-13 12:34:29 DEBUG SessionRegistryImpl:156 - Removing session CA174F1B4B889FFDBF47E22C7C4D5A0B from principal's set of registered sessions
2013-09-13 12:34:29 DEBUG SessionRegistryImpl:164 - Removing principal org.springframework.security.core.userdetails.User@d50fea1e: Username: tester; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_MANAGER,ROLE_USER from registry

web.xml

<session-config>
    <session-timeout>10</session-timeout>
</session-config>

回答1:


Session timeout can be overridden by various means. See http://docs.oracle.com/javaee/1.3/api/javax/servlet/http/HttpSession.html#setMaxInactiveInterval(int). Make sure there isn't anything else that is overriding it (Web/App server, framework, ...).



来源:https://stackoverflow.com/questions/18785073/spring-why-session-get-expired-before-session-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!