Create and initialize ThreadPoolTaskExecutor
@@ -24,7 +24,9 @@ public class SpringAsyncConfig implements AsyncConfigurer {
@Override
public Executor getAsyncExecutor() {
- return new SimpleAsyncTaskExecutor();
+ ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();
+ threadPoolTaskExecutor.initialize();
+ return threadPoolTaskExecutor;
}
@Override
