I want to listen to session life cycle events. I read about adding
org.springframework.security.web.session.Http
Adding Listener in Class which is extending SpringBootSelvletInitializer can be done as below.
@Configuration
public class Application extends SpringBootServletInitializer {
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
SpringApplicationBuilder app=application.sources(Application.class, ComponentConfiguration.class);
app.listeners(bootstrapContext.commandLineListener());
return app;
}
As the builder class is having listener method which use to add all the listener which is given to be registered. Github link for SpringApplicationBuilder is http://goo.gl/EGj6jE
I think this will solve your issue.
Swaraj