2019-01-08

2019-01-08  本文已影响0人  李彬燊666

                                                                                        用户注销功能:

logout注释:

.logout().deleteCookies("remove").invalidateHttpSession(false)

.logoutUrl("/custom-logout").logoutSuccessUrl("/logout-success");

默认访问地址是:/logout:     logoutUrl("/logout");如果是默认的话,会清除session和cookie里边的相关东西

LogoutSuccessHandler()方法的源码:

public interface LogoutSuccessHandler {

void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response,

Authentication authentication) throws IOException, ServletException;

}

--------------------------------------

lombok

@Data:在;在类上标注

@Equals

引入jar包

maven repository上搜

上一篇下一篇

猜你喜欢

热点阅读