wang-hao-jie
2021-11-03 01dd8732d223391cc2d6eda0941cc6497010e0fc
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
package cn.exrick.xboot.core.config.properties;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
/**
 * @author Exrickx
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "xboot.ratelimit")
public class XbootLimitProperties {
 
    /**
     * 是否开启全局限流
     */
    private Boolean enable = false;
 
    /**
     * 限制请求个数
     */
    private Long limit = 100L;
 
    /**
     * 每单位时间内(毫秒)
     */
    private Long timeout = 1000L;
}