Skip to content

Commit 76fdb96

Browse files
committed
feat: 비동기 처리 예외 핸들링 추가
1 parent 718b9ee commit 76fdb96

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main/java/in/koreatech/koin/global/config/AsyncConfig.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package in.koreatech.koin.global.config;
22

3+
import static java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
4+
35
import java.util.concurrent.Executor;
46

57
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
@@ -22,6 +24,7 @@ public Executor getAsyncExecutor() {
2224
executor.setMaxPoolSize(5);
2325
executor.setQueueCapacity(20);
2426
executor.setThreadNamePrefix("AsyncExecutor-");
27+
executor.setRejectedExecutionHandler(new CallerRunsPolicy());
2528
executor.initialize();
2629
return executor;
2730
}

0 commit comments

Comments
 (0)