Skip to content

Commit

Permalink
remove: AsyncConfig 필요없는 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
suw0n committed Apr 5, 2024
1 parent 517fa91 commit 880833e
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions dodam-infra/src/main/java/b1nd/dodaminfra/async/AsyncConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

Expand All @@ -11,10 +11,11 @@

@Configuration
@EnableAsync
class AsyncConfig implements AsyncConfigurer {
class AsyncConfig {

@Override
public Executor getAsyncExecutor() {
@Bean
@Primary
public Executor asyncExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(20);
executor.setMaxPoolSize(50);
Expand All @@ -25,9 +26,4 @@ public Executor getAsyncExecutor() {
return executor;
}

@Bean
public Executor asyncExecutor() {
return getAsyncExecutor();
}

}
}

0 comments on commit 880833e

Please sign in to comment.