diff --git a/core/core-api/src/main/java/io/dodn/springboot/core/api/config/AsyncConfig.java b/core/core-api/src/main/java/io/dodn/springboot/core/api/config/AsyncConfig.java index 0594705..a6c012b 100644 --- a/core/core-api/src/main/java/io/dodn/springboot/core/api/config/AsyncConfig.java +++ b/core/core-api/src/main/java/io/dodn/springboot/core/api/config/AsyncConfig.java @@ -1,6 +1,7 @@ package io.dodn.springboot.core.api.config; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; @@ -12,6 +13,7 @@ @EnableAsync public class AsyncConfig implements AsyncConfigurer { + @Bean @Override public Executor getAsyncExecutor() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); @@ -20,7 +22,6 @@ public Executor getAsyncExecutor() { executor.setQueueCapacity(10000); executor.setWaitForTasksToCompleteOnShutdown(true); executor.setAwaitTerminationSeconds(10); - executor.initialize(); return executor; }