diff --git a/src/main/java/configa/Application.java b/src/main/java/configa/Application.java index 3e8dbd0..effac5c 100644 --- a/src/main/java/configa/Application.java +++ b/src/main/java/configa/Application.java @@ -2,30 +2,12 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.web.embedded.tomcat.TomcatProtocolHandlerCustomizer; import org.springframework.cloud.config.server.EnableConfigServer; -import org.springframework.context.annotation.Bean; -import org.springframework.core.task.AsyncTaskExecutor; -import org.springframework.core.task.support.TaskExecutorAdapter; - -import java.util.concurrent.Executors; @SpringBootApplication @EnableConfigServer -@ConditionalOnProperty(value = "spring.thread-executor", havingValue = "virtual") public class Application { - @Bean - public AsyncTaskExecutor asyncTaskExecutor() { - return new TaskExecutorAdapter(Executors.newVirtualThreadPerTaskExecutor()); - } - - @Bean - public TomcatProtocolHandlerCustomizer protocolHandlerCustomizer() { - return protocolHandler -> protocolHandler.setExecutor(Executors.newVirtualThreadPerTaskExecutor()); - } - public static void main(String[] args) { SpringApplication.run(Application.class, args); }