diff --git a/hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterAutoConfiguration.java b/hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterAutoConfiguration.java index 45341184..938d861b 100644 --- a/hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterAutoConfiguration.java +++ b/hippo4j-spring-boot/hippo4j-spring-boot-starter-adapter/hippo4j-spring-boot-starter-adapter-web/src/main/java/cn/hippo4j/springboot/starter/adapter/web/WebAdapterAutoConfiguration.java @@ -27,6 +27,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.SearchStrategy; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; +import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.servlet.server.ServletWebServerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -64,7 +65,12 @@ public class WebAdapterAutoConfiguration { public ThreadPoolRunStateHandler threadPoolRunStateHandler(InetUtils hippo4JInetUtils) { return new ThreadPoolRunStateHandler(hippo4JInetUtils, environment); } - + /** + * Refer to the Tomcat loading source code . + * This load is performed if the {@link Tomcat} class exists and + * the Web embedded server loads the {@link ServletWebServerFactory} top-level interface type at the same time + * + * */ @Bean @ConditionalOnClass({Servlet.class, Tomcat.class, UpgradeProtocol.class}) @ConditionalOnBean(value = ServletWebServerFactory.class, search = SearchStrategy.CURRENT)