如何在Spring Boot应用程序中配置我的(嵌入式)Tomcat会话超时?
public class SessionListener implements HttpSessionListener{
@Override
public void sessionCreated(HttpSessionEvent se) {
se.getSession().setMaxInactiveInterval(5*60);
}
@Override
public void sessionDestroyed(HttpSessionEvent se) {
}}
Run Code Online (Sandbox Code Playgroud)
我有一个SessionListener,但我不知道在哪个类中我必须将此监听器添加到Context.