I want to listen to session life cycle events. I read about adding
org.springframework.security.web.session.Http
You can use ServletListenerRegistrationBean:
ServletListenerRegistrationBean
@Bean public ServletListenerRegistrationBean httpSessionEventPublisher() { return new ServletListenerRegistrationBean(new HttpSessionEventPublisher()); }