fix: 修改sercurity的放行策略
This commit is contained in:
parent
8e06463f12
commit
b98c015abc
@ -48,10 +48,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
.and()
|
.and()
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
// 对于登录接口 允许匿名访问
|
// 对于登录接口 允许匿名访问
|
||||||
.antMatchers("/login","/swagger/**","/v2/api-docs",
|
.antMatchers("/login","/swagger/**","/v2/**",
|
||||||
"/doc.html",
|
"/doc.html",
|
||||||
"/swagger-resources/**",
|
"/swagger-resources/**",
|
||||||
"/swagger-ui/**").anonymous()
|
"/swagger-ui/**",
|
||||||
|
"/webjars/**").anonymous()
|
||||||
// .antMatchers("/testCors").hasAuthority("system:dept:list222")
|
// .antMatchers("/testCors").hasAuthority("system:dept:list222")
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
|
Loading…
Reference in New Issue
Block a user