Concurrent
Configuration
@Configuration
@EnableAsync
public class AsyncConfig {
@Bean
public Executor taskExecutor(){
ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();
threadPoolTaskExecutor.setCorePoolSize(1);
threadPoolTaskExecutor.setQueueCapacity(50);
threadPoolTaskExecutor.setMaxPoolSize(10);
return threadPoolTaskExecutor;
}
}Controller
Service
Last updated