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

前端 未结 5 1080
栀梦
栀梦 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

    Using built-in capabilities and with anotated spring configuration this will be like that:

        @Bean
        public TaskScheduler taskScheduler() {
            return new ConcurrentTaskScheduler(new ScheduledThreadPoolExecutor(20));
        }
    

提交回复
热议问题