您可以在web.xml中为所有会话设置会话超时(例如60分钟):
<session-config> <session-timeout>60</session-timeout></session-config>
或按会话使用
session.setMaxInactiveInterval(60*60);
后者您可能要在authorizationSuccessHandler中进行。
<form-login authentication-success-handler-ref="authenticationSuccessHandler"/>



