public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
this.applicationEventPublisher = applicationEventPublisher;
}
protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
this.applicationEventPublisher.publishEvent(new LogoutEvent(this, httpServletRequest.getSession(), this.userHolder.getUser()));
this.userHolder.setUser(null);
httpServletRequest.getSession().invalidate();
return new ModelAndView(this.logOutView);
}