From 1988bbb3893aabe21a7e1a6ec22638ba942a5506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Wed, 4 Dec 2024 11:02:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20request.getRequestURI()=20=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=A4=9A=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=B9=B6=E5=8F=91?= =?UTF-8?q?=E9=94=81=E4=B8=8D=E4=BD=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig4cloud/plugin/idempotent/aspect/IdempotentAspect.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/pig4cloud/plugin/idempotent/aspect/IdempotentAspect.java b/src/main/java/com/pig4cloud/plugin/idempotent/aspect/IdempotentAspect.java index 8607e1e..4de4a2f 100644 --- a/src/main/java/com/pig4cloud/plugin/idempotent/aspect/IdempotentAspect.java +++ b/src/main/java/com/pig4cloud/plugin/idempotent/aspect/IdempotentAspect.java @@ -73,7 +73,7 @@ public void beforePointCut(JoinPoint joinPoint) { // 若没有配置 幂等 标识编号,则使用 url + 参数列表作为区分 if (!StringUtils.hasLength(idempotent.key())) { - String url = request.getRequestURL().toString(); + String url = request.getRequestURI(); String argString = Arrays.asList(joinPoint.getArgs()).toString(); key = url + argString; } @@ -83,7 +83,7 @@ public void beforePointCut(JoinPoint joinPoint) { } // 当配置了el表达式但是所选字段为空时,会抛出异常,兜底使用url做标识 if (key == null) { - key = request.getRequestURL().toString(); + key = request.getRequestURI(); } long expireTime = idempotent.expireTime();