title: Spring Boot Java Config Set Session Timeout
body: <p>How can I configure my (embedded) Tomcat Session Timeout in a Spring Boot Application?</p>
  
  <pre><code>public class SessionListener implements HttpSessionListener{
  
  @Override
  public void sessionCreated(HttpSessionEvent se) {
      se.getSession().setMaxInactiveInterval(5*60);
  }
  
  @Override
  public void sessionDestroyed(HttpSessionEvent se) {
  
  }}
  </code></pre>
  
  <p>I have a SessionListener but I have no idea in which class I have to add this Listener to the Context.</p>