首页>代码>SpringBoot+vue前后端分离-模板项目,适合新手小白二次开发,太香了>/EasyJavaTemplate/SpringBoot/src/main/java/cn/wujiangbo/annotation/RateLimit.java
package cn.wujiangbo.annotation;

import java.lang.annotation.*;

/**
 * 用于防刷限流的注解
 *      默认是5秒内只能调用一次
 * @author 波波老师(weixin:javabobo0513)
 */
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RateLimit {
    
    /** 限流的key */
    String key() default "limit:";

    /** 周期,单位是秒 */
    int cycle() default 5;

    /** 请求次数 */
    int count() default 1;

    /** 默认提示信息 */
    String msg() default "请勿重复点击";
}
最近下载更多
jc121140  LV3 3月22日
wanglinddad  LV55 3月14日
welcome丶  LV8 3月7日
全栈小陈  LV4 1月21日
oulingqiao  LV13 1月11日
root111snkdnc  LV3 2023年12月27日
123854216  LV5 2023年12月16日
ljfydm  LV2 2023年10月15日
huhansan  LV10 2023年10月13日
lkx666  LV3 2023年10月10日
最近浏览更多
飃go with wind 5月7日
暂无贡献等级
来一杯西瓜冰咩  LV1 5月6日
kenhomeliu  LV29 4月30日
win nas 4月28日
暂无贡献等级
2775645521  LV5 4月23日
不想起  LV10 4月22日
做自己的太阳  LV11 4月17日
zhangtian1997  LV10 4月15日
strongning  LV3 4月5日
玖零定制问题修复  LV34 4月4日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友