作者 RuoYi

优化限流打印日志KEY(I5SQ09)

@@ -50,7 +50,6 @@ public class RateLimiterAspect @@ -50,7 +50,6 @@ public class RateLimiterAspect
50 @Before("@annotation(rateLimiter)") 50 @Before("@annotation(rateLimiter)")
51 public void doBefore(JoinPoint point, RateLimiter rateLimiter) throws Throwable 51 public void doBefore(JoinPoint point, RateLimiter rateLimiter) throws Throwable
52 { 52 {
53 - String key = rateLimiter.key();  
54 int time = rateLimiter.time(); 53 int time = rateLimiter.time();
55 int count = rateLimiter.count(); 54 int count = rateLimiter.count();
56 55
@@ -63,7 +62,7 @@ public class RateLimiterAspect @@ -63,7 +62,7 @@ public class RateLimiterAspect
63 { 62 {
64 throw new ServiceException("访问过于频繁,请稍候再试"); 63 throw new ServiceException("访问过于频繁,请稍候再试");
65 } 64 }
66 - log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, number.intValue(), key); 65 + log.info("限制请求'{}',当前请求'{}',缓存key'{}'", count, number.intValue(), combineKey);
67 } 66 }
68 catch (ServiceException e) 67 catch (ServiceException e)
69 { 68 {