AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
### 1. 编写 失败注销用户处理器 并且继承 LogoutSuccessHandler 实现 onLogoutSuccess ~~~ @Component public class WebLogoutSuccessHandler implements LogoutSuccessHandler { @Override public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { System.out.println("退出登录"); } } ~~~ ### 2 .配置 ~~~ /* http.logout()// 退出 .logoutSuccessHandler(logoutSuccessHandler) // 触发注销发生的请求匹配器 // 退出地址 只能设置一个 // .logoutUrl("/logout") .logoutRequestMatcher(new AntPathRequestMatcher("/logout"));*/ //或者 http.logout().defaultLogoutSuccessHandlerFor(logoutSuccessHandler,new AntPathRequestMatcher("/logout")) // 退出成功之前操作 .addLogoutHandler(logoutHandler); ~~~