|
@@ -15,17 +15,16 @@ import java.util.concurrent.ThreadPoolExecutor;
|
|
|
public class ExecutorConfig {
|
|
|
|
|
|
/** 核心线程数(默认线程数) */
|
|
|
- private int corePoolSize = 10;
|
|
|
+ private int corePoolSize = 20;
|
|
|
/** 最大线程数 */
|
|
|
- private int maxPoolSize = 20;
|
|
|
+ private int maxPoolSize = 100;
|
|
|
/** 允许线程空闲时间(单位:默认为秒) */
|
|
|
private static final int keepAliveTime = 60;
|
|
|
/** 缓冲队列大小 */
|
|
|
- private int queueCapacity = 10;
|
|
|
+ private int queueCapacity = 100;
|
|
|
|
|
|
@Bean(name = "asyncServiceExecutor")
|
|
|
public Executor asyncServiceExecutor(){
|
|
|
- log.info("start asyncServiceExecutor++++++++++++++++++++++");
|
|
|
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
|
//配置核心线程数
|
|
|
executor.setCorePoolSize(corePoolSize);
|