Spring 3.5 how to add HttpSessionEventPublisher to my boot configuration

前端 未结 4 2170
别那么骄傲
别那么骄傲 2021-02-08 10:44

I want to listen to session life cycle events. I read about adding


   
     org.springframework.security.web.session.Http         


        
4条回答
  •  暖寄归人
    2021-02-08 11:06

    You can use ServletListenerRegistrationBean:

    @Bean
    public ServletListenerRegistrationBean httpSessionEventPublisher() {
        return new ServletListenerRegistrationBean(new HttpSessionEventPublisher());
    }
    

提交回复
热议问题