使用代理密码管理器,修改退出登陆接口地址为/api/logout/

main
ylyhappy 3 years ago
parent 2d7c778d1f
commit 30e16b63df
  1. 10
      CarbonSysBE1/src/main/java/edu/ncst/carbon/config/SecurityConfig.java

@ -103,10 +103,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
/** /**
* 密码加密器 * 密码加密器
*/ */
@Bean // @Bean
public PasswordEncoder passwordEncoderBean() { // public PasswordEncoder passwordEncoderBean() {
return new BCryptPasswordEncoder(); // return new BCryptPasswordEncoder();
} // }
/** /**
* 权限投票访问决策管理器 * 权限投票访问决策管理器
@ -189,7 +189,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
// 退出登录 // 退出登录
http.logout() http.logout()
.logoutUrl("/logout") .logoutUrl("/api/logout")
.deleteCookies("JSESSIONID") .deleteCookies("JSESSIONID")
.logoutSuccessHandler(((request, response, authentication) -> { .logoutSuccessHandler(((request, response, authentication) -> {
PrintWriter out = response.getWriter(); PrintWriter out = response.getWriter();

Loading…
Cancel
Save