update 更新 RedisUtils 返回客户端实例
This commit is contained in:
parent
8362fe1b39
commit
1445d6d24a
@ -45,10 +45,10 @@ public class RedisUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取实例id
|
* 获取客户端实例
|
||||||
*/
|
*/
|
||||||
public static String getClientId() {
|
public static RedissonClient getClient() {
|
||||||
return CLIENT.getId();
|
return CLIENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,7 +54,7 @@ public class RateLimiterAspect {
|
|||||||
stringBuffer.append(ServletUtils.getClientIP()).append("-");
|
stringBuffer.append(ServletUtils.getClientIP()).append("-");
|
||||||
} else if (rateLimiter.limitType() == LimitType.CLUSTER){
|
} else if (rateLimiter.limitType() == LimitType.CLUSTER){
|
||||||
// 获取客户端实例id
|
// 获取客户端实例id
|
||||||
stringBuffer.append(RedisUtils.getClientId()).append("-");
|
stringBuffer.append(RedisUtils.getClient().getId()).append("-");
|
||||||
}
|
}
|
||||||
MethodSignature signature = (MethodSignature) point.getSignature();
|
MethodSignature signature = (MethodSignature) point.getSignature();
|
||||||
Method method = signature.getMethod();
|
Method method = signature.getMethod();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user