用户成功登录后,我需要在DB中存储实际日期。怎么做 ?过滤器,处理程序还是其他?需要帮忙。

最佳答案

    public class AuthenticationSuccessHandlerImpl extends SimpleUrlAuthenticationSuccessHandler {
           @Override
       public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
       throws IOException, ServletException {
       //your code here
     }
}

配置:
<beans:bean id="authSuccessHandler"
            class="your.pachage.decleration.AuthenticationSuccessHandlerImpl"/>

关于java - Spring -登录后请执行一些操作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7333293/

10-09 00:23