利用spring如何实现接口限流

mikidun 20 0 PDF 2020-12-23 01:12:37

利用spring如何实现接口限流 1.创建自定义注解 ** * 限流注解 */ @Inherited @Documented @Target({ElementType.FIELD, ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface AccessLimit { //限流唯一标识 String key() default ""; //限流时间 int time(); //限流次数 int count(); }

用户评论
请输入评论内容
评分:
暂无评论