mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
@ -15,7 +15,8 @@ import java.lang.annotation.*;
|
||||
@Documented
|
||||
public @interface RateLimiter {
|
||||
/**
|
||||
* 限流key
|
||||
* 限流key,支持使用Spring el表达式来动态获取方法上的参数值
|
||||
* 格式类似于 #code.id #{#code}
|
||||
*/
|
||||
String key() default CacheConstants.RATE_LIMIT_KEY;
|
||||
|
||||
@ -33,4 +34,9 @@ public @interface RateLimiter {
|
||||
* 限流类型
|
||||
*/
|
||||
LimitType limitType() default LimitType.DEFAULT;
|
||||
|
||||
/**
|
||||
* 提示消息 支持国际化 格式为 {code}
|
||||
*/
|
||||
String message() default "{rate.limiter.message}";
|
||||
}
|
||||
|
Reference in New Issue
Block a user