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

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_";
}