Skip to content

Commit

Permalink
fix: request.getRequestURI() 避免多服务器并发锁不住
Browse files Browse the repository at this point in the history
  • Loading branch information
lltx authored Dec 4, 2024
1 parent e0fcffa commit 1988bbb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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();
Expand Down

0 comments on commit 1988bbb

Please sign in to comment.