Aspect不拦截HttpStatusReturningLogoutSuccessHandler.onLogoutSuccess()方法

时间:2016-07-12 13:09:24

标签: java spring aop aspectj

我正在尝试记录用户登录和注销活动,我能够使用切入点表达式拦截登录 org.springframework.security.web.authentication.AuthenticationSuccessHandler.onAuthenticationSuccess()

但是对于退出活动,它不会使用切入点表达式进行拦截 org.springframework.security.web.authentication.logout.HttpStatusReturningLogoutSuccessHandler.onLogoutSuccess()

下面是我的logLogoutActivity()

@After("execution(* org.springframework.security.web.authentication.logout.HttpStatusReturningLogoutSuccessHandler.onLogoutSuccess(..))") 
    @Transactional
    public void logLogoutActivity(JoinPoint joinPoint) throws Throwable {           
        prepareLogAndSave(HistoryLogCode.LOGGED_OUT.getId(), 
                HistoryLogCode.LOGGED_OUT.getValue(), "Successfully logged out.");
    }

有人知道如何记录退出活动吗?顺便说一句,我使用Spring安全性来验证我的用户。谢谢你提前。

0 个答案:

没有答案