You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/java/com/glxp/api/config/ThreadPoolConfigProperties....

37 lines
795 B
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.glxp.api.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
// 1. 创建配置类建议放在config包下
@ConfigurationProperties(prefix = "thread.pool")
@Data
public class ThreadPoolConfigProperties {
/**
* 核心线程数默认CPU核心数
*/
private Integer corePoolSize;
/**
* 最大线程数默认CPU核心数*2
*/
private Integer maxPoolSize;
/**
* 队列容量默认200
*/
private int queueCapacity = 200;
/**
* 线程空闲时间默认60
*/
private int keepAliveSeconds = 60;
/**
* 线程名前缀(默认"custom_executor_"
*/
private String threadNamePrefix = "custom_executor_";
}