1.0
xin
2025-04-15 e718afd02965c6a4018506acb1ae99baca0c5645
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
33
34
package com.oying.annotation;
 
import com.oying.aspect.LimitType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
/**
 * @author Z
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Limit {
 
    // 资源名称,用于描述接口功能
    String name() default "";
 
    // 资源 key
    String key() default "";
 
    // key prefix
    String prefix() default "";
 
    // 时间的,单位秒
    int period();
 
    // 限制访问次数
    int count();
 
    // 限制类型
    LimitType limitType() default LimitType.CUSTOMER;
 
}