测试用户
2023-04-13 43393f2bb11cbf9e6af40077bbc5284660e8a754
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.common.annotation;
 
import java.lang.annotation.*;
 
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
/**
 * one minutes request frequency is Fifty times, exceeding the wait five minutes
 * @author Administrator
 *
 */
public @interface RequestLimit {
    int DEFAULT_TIME= 60;//60秒
    int DEFAULT_COUNT= 1000;//1000次
    int DEFAULT_SIZE= 5;//5M
    /**
     * 时间范围
     * @return
     */
    int time() default DEFAULT_TIME;
    /**
     * 时间范围内次数
     * @return
     */
    int count() default DEFAULT_COUNT;
    /**
     * 请求体大小
     * @return
     */
    int size() default DEFAULT_SIZE;
}