| | |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.Primary; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | |
| | |
| | | public class ThreadPoolConfig { |
| | | |
| | | @Bean(name = "orderThreadPool") |
| | | @Primary |
| | | public ThreadPoolTaskExecutor orderThreadPool() { |
| | | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); |
| | | int core = Runtime.getRuntime().availableProcessors(); |