From 3affec34d8eeb4b8402369937c044abd0194cadc Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 1 Oct 2024 11:34:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E3=80=91=E5=85=A8=E5=B1=80=EF=BC=9A=E9=BB=98=E8=AE=A4=20/app-a?= =?UTF-8?q?pi/*=20=E9=9C=80=E8=A6=81=E7=99=BB=E5=BD=95=EF=BC=8C=E5=92=8C?= =?UTF-8?q?=20/admin-api/*=20=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4=EF=BC=8C?= =?UTF-8?q?=E9=99=8D=E4=BD=8E=E5=A4=A7=E5=AE=B6=E7=90=86=E8=A7=A3=E6=88=90?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../security/config/YudaoWebSecurityConfigurerAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java index 5613ce7f89..c91bc31906 100644 --- a/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java +++ b/yudao-framework/yudao-spring-boot-starter-security/src/main/java/cn/iocoder/yudao/framework/security/config/YudaoWebSecurityConfigurerAdapter.java @@ -129,14 +129,14 @@ public class YudaoWebSecurityConfigurerAdapter { .authorizeHttpRequests(c -> c // 1.1 静态资源,可匿名访问 .requestMatchers(HttpMethod.GET, "/*.html", "/*.html", "/*.css", "/*.js").permitAll() - // 1.1 设置 @PermitAll 无需认证 + // 1.2 设置 @PermitAll 无需认证 .requestMatchers(HttpMethod.GET, permitAllUrls.get(HttpMethod.GET).toArray(new String[0])).permitAll() .requestMatchers(HttpMethod.POST, permitAllUrls.get(HttpMethod.POST).toArray(new String[0])).permitAll() .requestMatchers(HttpMethod.PUT, permitAllUrls.get(HttpMethod.PUT).toArray(new String[0])).permitAll() .requestMatchers(HttpMethod.DELETE, permitAllUrls.get(HttpMethod.DELETE).toArray(new String[0])).permitAll() .requestMatchers(HttpMethod.HEAD, permitAllUrls.get(HttpMethod.HEAD).toArray(new String[0])).permitAll() .requestMatchers(HttpMethod.PATCH, permitAllUrls.get(HttpMethod.PATCH).toArray(new String[0])).permitAll() - // 1.2 基于 yudao.security.permit-all-urls 无需认证 + // 1.3 基于 yudao.security.permit-all-urls 无需认证 .requestMatchers(securityProperties.getPermitAllUrls().toArray(new String[0])).permitAll() ) // ②:每个项目的自定义规则