diff --git a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java index c2297edd..f29868fb 100644 --- a/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java +++ b/hippo4j-spring-boot/hippo4j-spring-boot-starter/src/main/java/cn/hippo4j/starter/handler/web/AbstractWebThreadPoolService.java @@ -38,9 +38,9 @@ public abstract class AbstractWebThreadPoolService implements WebThreadPoolServi public Executor getWebThreadPool() { if (executor == null) { synchronized (AbstractWebThreadPoolService.class) { - ApplicationContext applicationContext = ApplicationContextHolder.getInstance(); - WebServer webServer = ((WebServerApplicationContext) applicationContext).getWebServer(); if (executor == null) { + ApplicationContext applicationContext = ApplicationContextHolder.getInstance(); + WebServer webServer = ((WebServerApplicationContext) applicationContext).getWebServer(); executor = getWebThreadPoolByServer(webServer); } }