提交 | 用户 | 时间
|
722af2
|
1 |
package com.dl.framework.config.properties; |
X |
2 |
|
|
3 |
import lombok.Data; |
|
4 |
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
5 |
import org.springframework.stereotype.Component; |
|
6 |
|
|
7 |
/** |
|
8 |
* 线程池 配置属性 |
|
9 |
* |
|
10 |
* @author Lion Li |
|
11 |
*/ |
|
12 |
@Data |
|
13 |
@Component |
|
14 |
@ConfigurationProperties(prefix = "thread-pool") |
|
15 |
public class ThreadPoolProperties { |
|
16 |
|
|
17 |
/** |
|
18 |
* 是否开启线程池 |
|
19 |
*/ |
|
20 |
private boolean enabled; |
|
21 |
|
|
22 |
/** |
|
23 |
* 队列最大长度 |
|
24 |
*/ |
|
25 |
private int queueCapacity; |
|
26 |
|
|
27 |
/** |
|
28 |
* 线程池维护线程所允许的空闲时间 |
|
29 |
*/ |
|
30 |
private int keepAliveSeconds; |
|
31 |
|
|
32 |
} |