I have a spring boot (1.3.2) app in which I have implemented a HttpSessionListener. I registered the listener from a @Configration class
@Configuration
@EnableRedisHttpSession
public class ApplicationSessionConfiguration {
@Bean
public ServletListenerRegistrationBean<HttpSessionListener> sessionListener() {
return new ServletListenerRegistrationBean<HttpSessionListener>(new SessionListener());
}
}
I have debugged into ServletListenerRegistrationBean.onInitialize method and the listener is getting registered with the ServletContext. Problem is now when I make a dummy REST call to the app the session gets created properly and sent back as a SESSION cookie, but the HttpSessionListener.createSession method never gets called. I am not sure what I am missing here.