SpringBoot_10_Listener

weixin_34146805發表於2016-11-29
import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
@WebListener
public class CustemHttpSessionListener implements HttpSessionListener {
    @Override
    public void sessionCreated(HttpSessionEvent se){
        System.out.println("Session 被建立");
    }
    @Override
    public void sessionDestroyed(HttpSessionEvent se){
        System.out.println("Session 銷燬");
    }
}

http://412887952-qq-com.iteye.com/blog/2292475
https://zhidao.baidu.com/question/165002750.html