From c4cbb1db422a1ce30ee59cf56294920d36dc5727 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 3 Sep 2023 17:58:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=20https://gitee.com/zhijiant?= =?UTF-8?q?ianya/ruoyi-vue-pro/pulls/594/files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/web/core/util/WebFrameworkUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/util/WebFrameworkUtils.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/util/WebFrameworkUtils.java index c2b30446a..db996db06 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/util/WebFrameworkUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/util/WebFrameworkUtils.java @@ -89,10 +89,10 @@ public class WebFrameworkUtils { return userType; } // 2. 其次,基于 URL 前缀的约定 - if (request.getRequestURI().startsWith(properties.getAdminApi().getPrefix())) { + if (request.getServletPath().startsWith(properties.getAdminApi().getPrefix())) { return UserTypeEnum.ADMIN.getValue(); } - if (request.getRequestURI().startsWith(properties.getAppApi().getPrefix())) { + if (request.getServletPath().startsWith(properties.getAppApi().getPrefix())) { return UserTypeEnum.MEMBER.getValue(); } return null;