perf: 调整线程池配置
parent
16423a29a4
commit
731998dde6
@ -1,17 +0,0 @@
|
|||||||
package com.xydl.cac.config;
|
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.scheduling.TaskScheduler;
|
|
||||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
public class TaskSchedulerConfig {
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public TaskScheduler taskScheduler() {
|
|
||||||
ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
|
|
||||||
scheduler.setPoolSize(5);
|
|
||||||
return scheduler;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue