This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
hummingbird
/
spring-boot-demo
Not watched
Unwatch
Watch all
Watch but not notify
2
Star
0
Fork
0
Code
Releases
0
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
💡
添加源码注释
pull/1/head
Yangkai.Shen
5 years ago
parent
27e2742c14
commit
6320d75d4a
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
spring-boot-demo-ratelimit-redis/src/main/java/com/xkcoding/ratelimit/redis/aspect/RateLimiterAspect.java
+ 1
- 1
spring-boot-demo-ratelimit-redis/src/main/java/com/xkcoding/ratelimit/redis/aspect/RateLimiterAspect.java
View File
@@ -75,7 +75,7 @@ public class RateLimiterAspect {
private boolean shouldLimited(String key, long max, long timeout, TimeUnit timeUnit) {
// 最终的 key 格式为:
// limit:自定义key:IP
// limit:方法名:IP
// limit:
类名.
方法名:IP
key = REDIS_LIMIT_KEY_PREFIX + key;
// 统一使用单位毫秒
long ttl = timeUnit.toMillis(timeout);
Write
Preview
Loading…
Cancel
Save