定时任务一个多线程
@Component
public class BeanConfig {
@Bean
public TaskScheduler taskScheduler() {
ThreadPoolTaskScheduler taskScheduler = new ThreadPoolTaskScheduler();
taskScheduler.setPoolSize(3);//设置的线程数是3
return taskScheduler;
}