|
@@ -21,9 +21,9 @@ public class ListenerAsyncConfiguration implements AsyncConfigurer
|
|
|
//使用Spring内置线程池任务对象
|
|
|
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
|
|
|
//设置线程池参数
|
|
|
- taskExecutor.setCorePoolSize(5);
|
|
|
- taskExecutor.setMaxPoolSize(10);
|
|
|
- taskExecutor.setQueueCapacity(25);
|
|
|
+ taskExecutor.setCorePoolSize(1);
|
|
|
+ taskExecutor.setMaxPoolSize(1);
|
|
|
+ taskExecutor.setQueueCapacity(100);
|
|
|
taskExecutor.initialize();
|
|
|
return taskExecutor;
|
|
|
}
|