Describe the bug I use tomcat as servlet container in springboot, and use eureka-server as the naming service. the version is : spring-boot-2.0.3.RELEASE and spring-boot-2.5.?.RELEASE

I notice that when I turn on tomcat's min-spare-threads to a big number, see 100, I'll get many error requests when I restart the application. Then I check the code inside and find that, spring application registers to naming-service before it starts tomcat server(start the worker and accepter threads), that is to say, the application may be available(to other eureka clients) before tomcat gets ready. Which confuse me ver much, why not start tomcat first?

Sample first we start a eureka-server: Spring Cloud Netflix Eureka-client register to naming-service before embed-tomcat(servlet container) is ready .

then we add a break point here in spring-boot-2.0.3.RELEASE-sources.jar!/org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext#finishRefresh Spring Cloud Netflix Eureka-client register to naming-service before embed-tomcat(servlet container) is ready .

and we start this application in debug model, we'll stop here: Spring Cloud Netflix Eureka-client register to naming-service before embed-tomcat(servlet container) is ready . as the console shows, this application has register to eureka server. Spring Cloud Netflix Eureka-client register to naming-service before embed-tomcat(servlet container) is ready .

While this application is accessible for other eureka-clients, it's not ready for http requests. Spring Cloud Netflix Eureka-client register to naming-service before embed-tomcat(servlet container) is ready .

I think this is a bug, should not start servlet container first?