[Spring] @Async thread default configuration Analysis of the problem that the @Async method is not executed in the SpringBoot project

 

@Async asynchronous method uses Spring to create ThreadPoolTaskExecutor by default

配置类是TaskExecutionProperties【org.springframework.boot.autoconfigure.task.TaskExecutionProperties】

 

The default number of core threads: 8

Maximum number of threads: Integet.MAX_VALUE

The queue uses LinkedBlockingQueue, the capacity is: Integet.MAX_VALUE

Idle thread retention time: 60s

Thread pool rejection policy: AbortPolicy

 

 

 

 

 

 

Reference address

Analysis of the problem that the @Async method is not implemented in the SpringBoot project  :  https://www.cnblogs.com/hepengju/p/12715034.html 

 

Guess you like

Origin www.cnblogs.com/kiko2014551511/p/12754927.html