提交 8b94b253 编写于 作者: zhouweidong's avatar zhouweidong

注销清除缓存

上级 993db75c
......@@ -45,6 +45,9 @@ public class ${app.getPKGCodeName()}SecurityConfig extends WebSecurityConfigurer
@Value("${r'${ibiz.auth.path:v7/login}"'})
private String loginPath;
@Value("${r'${ibiz.auth.logoutpath:v7/logout}"'})
private String logoutPath;
@Value("${r'${ibiz.file.uploadpath:ibizutil/upload}"'})
private String uploadpath;
......@@ -110,6 +113,8 @@ public class ${app.getPKGCodeName()}SecurityConfig extends WebSecurityConfigurer
).permitAll()
//放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.POST,"/"+logoutPath).permitAll()
// 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll()
......
......@@ -44,6 +44,9 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${r'${ibiz.auth.path:v7/login}"'})
private String loginPath;
@Value("${r'${ibiz.auth.logoutpath:v7/logout}"'})
private String logoutPath;
@Value("${r'${ibiz.file.uploadpath:ibizutil/upload}"'})
private String uploadpath;
......@@ -105,6 +108,8 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
).permitAll()
//放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.POST,"/"+logoutPath).permitAll()
// 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll()
......
......@@ -39,4 +39,11 @@ public class AppController {
appData.put("enablepermissionvalid",enablePermissionValid);
return ResponseEntity.status(HttpStatus.OK).body(appData);
}
@RequestMapping(method = RequestMethod.GET, value = "${r'${ibiz.auth.logoutpath:v7/logout}'}")
public void logout() {
if(AuthenticationUser.getAuthenticationUser()!=null){
userDetailsService.resetByUsername(AuthenticationUser.getAuthenticationUser().getUsername());
}
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册