Closed
Description
At the present moment Spring Boot 2 does not handle automatic web listener registration. For this reason ServletListenerRegistrationBean is recommended to use. But this bean doesn't support relatively new HttpSessionIdListener (actually already legacy from spring boot's point of view) which is necessary to track session when using together with Spring security enabled. At the moment only these types of listeners are supported:
types.add(ServletContextAttributeListener.class);
types.add(ServletRequestListener.class);
types.add(ServletRequestAttributeListener.class);
types.add(HttpSessionAttributeListener.class);
types.add(HttpSessionListener.class);
types.add(ServletContextListener.class);
Also look here at the description of what listeners should be supported.