What is the default scheduler pool size in spring-boot?

前端 未结 5 1085
栀梦
栀梦 2020-12-05 09:53

I\'m using spring-boot and @Scheduled annotation to execute some tasks.

How can I find out what the default pool size of scheduled tasks is

5条回答
  •  半阙折子戏
    2020-12-05 10:03

    a very simple way to do this:

    @Configuration
    public class ScheduleConfig {
      ScheduleConfig(ThreadPoolTaskScheduler threadPoolTaskScheduler) {
        threadPoolTaskScheduler.setPoolSize(10);
      }
    }
    

提交回复
热议问题