xiangpei
2025-05-19 76695c351a2a1a1cb09fedcdd1459c02c49b489d
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
35
36
37
38
39
40
41
42
43
package cn.lili.common.properties;
 
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
 
/**
 * 线程配置
 * @author Chopper
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "lili.thread")
public class ThreadProperties {
 
 
    /**
     * 核心线程数
     */
    private Integer corePoolSize = 10;
 
    /**
     * 最大线程数
     */
    private Integer maxPoolSize = 50;
 
    /**
     * 队列最大长度
     */
    private Integer queueCapacity = Integer.MAX_VALUE;
 
    /**
     * 允许超时关闭
     */
    private Boolean allowCoreThreadTimeOut = false;
 
    /**
     * 保持存活时间
     */
    private Integer keepAliveSeconds = 60;
 
 
}