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

注销清除缓存

上级 993db75c
...@@ -45,6 +45,9 @@ public class ${app.getPKGCodeName()}SecurityConfig extends WebSecurityConfigurer ...@@ -45,6 +45,9 @@ public class ${app.getPKGCodeName()}SecurityConfig extends WebSecurityConfigurer
@Value("${r'${ibiz.auth.path:v7/login}"'}) @Value("${r'${ibiz.auth.path:v7/login}"'})
private String loginPath; private String loginPath;
@Value("${r'${ibiz.auth.logoutpath:v7/logout}"'})
private String logoutPath;
@Value("${r'${ibiz.file.uploadpath:ibizutil/upload}"'}) @Value("${r'${ibiz.file.uploadpath:ibizutil/upload}"'})
private String uploadpath; private String uploadpath;
...@@ -110,6 +113,8 @@ public class ${app.getPKGCodeName()}SecurityConfig extends WebSecurityConfigurer ...@@ -110,6 +113,8 @@ public class ${app.getPKGCodeName()}SecurityConfig extends WebSecurityConfigurer
).permitAll() ).permitAll()
//放行登录请求 //放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll() .antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.POST,"/"+logoutPath).permitAll()
// 文件操作 // 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll() .antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll() .antMatchers("/"+uploadpath).permitAll()
......
...@@ -44,6 +44,9 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -44,6 +44,9 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${r'${ibiz.auth.path:v7/login}"'}) @Value("${r'${ibiz.auth.path:v7/login}"'})
private String loginPath; private String loginPath;
@Value("${r'${ibiz.auth.logoutpath:v7/logout}"'})
private String logoutPath;
@Value("${r'${ibiz.file.uploadpath:ibizutil/upload}"'}) @Value("${r'${ibiz.file.uploadpath:ibizutil/upload}"'})
private String uploadpath; private String uploadpath;
...@@ -105,6 +108,8 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter { ...@@ -105,6 +108,8 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
).permitAll() ).permitAll()
//放行登录请求 //放行登录请求
.antMatchers( HttpMethod.POST,"/"+loginPath).permitAll() .antMatchers( HttpMethod.POST,"/"+loginPath).permitAll()
//放行注销请求
.antMatchers( HttpMethod.POST,"/"+logoutPath).permitAll()
// 文件操作 // 文件操作
.antMatchers("/"+downloadpath+"/**").permitAll() .antMatchers("/"+downloadpath+"/**").permitAll()
.antMatchers("/"+uploadpath).permitAll() .antMatchers("/"+uploadpath).permitAll()
......
...@@ -39,4 +39,11 @@ public class AppController { ...@@ -39,4 +39,11 @@ public class AppController {
appData.put("enablepermissionvalid",enablePermissionValid); appData.put("enablepermissionvalid",enablePermissionValid);
return ResponseEntity.status(HttpStatus.OK).body(appData); 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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册