From b98c015abce316baef29ec83135ae2d7efe9b73c Mon Sep 17 00:00:00 2001 From: weihongyang <1075331873@qq.com> Date: Tue, 21 Jun 2022 14:34:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9sercurity=E7=9A=84?= =?UTF-8?q?=E6=94=BE=E8=A1=8C=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/cnbm/admin/config/SecurityConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java index 01bb30f..8a6b5c8 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java +++ b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java @@ -48,10 +48,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { .and() .authorizeRequests() // 对于登录接口 允许匿名访问 - .antMatchers("/login","/swagger/**","/v2/api-docs", + .antMatchers("/login","/swagger/**","/v2/**", "/doc.html", "/swagger-resources/**", - "/swagger-ui/**").anonymous() + "/swagger-ui/**", + "/webjars/**").anonymous() // .antMatchers("/testCors").hasAuthority("system:dept:list222") // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated();