开放文档逻辑修改

This commit is contained in:
暮光:城中城
2019-01-28 23:12:55 +08:00
parent c2b64d06e4
commit c8ac59e59a
4 changed files with 17 additions and 6 deletions

View File

@@ -46,7 +46,12 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception {
String loginPage = "/static/manage/login.html";
http.authorizeRequests().antMatchers("/login/**").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
http.authorizeRequests()
.antMatchers(
"/login/**", "/open-doc.html",
"/webjars/open-doc/**", "/swagger-mg-ui/open-doc/**",
"/webjars/zui/**", "/webjars/vue/**"
).permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
.antMatchers("/document.html", "/doc.html").hasAuthority("DOC_ALL")
// 其他地址的访问均需登录
.anyRequest().authenticated().and()