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;
|
}
|