fix: 增加多线程
parent
d378c43e84
commit
709fd61d6e
@ -0,0 +1,17 @@
|
|||||||
|
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