fix: 增加多线程

dev
huangfeng 1 year ago
parent cd9799f2c4
commit 52ad96e963

@ -0,0 +1,17 @@
package com.shxy.xymanager_framework.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…
Cancel
Save