Summary: Using Spring Boot 2.0.0.RELEASE with embedded Tomcat 2.0.0.RELEASE, the project is packaged as a WAR file and deployed online. Many APIs take a long time to respond the first time they are accessed, but not afterwards, and the delay is not fixed. However, if the project is packaged as a JAR file and deployed online, the first API access no longer takes a long time. What could be the reason for this?

Comment From: wilkinsona

Unfortunately, Spring Boot 2.0.0 is no longer support.

Comment From: zhangminxiaozhang

@wilkinsona Thank you for your reply,But I still have this problem even if I switch to 3.0. What I want to ask is whether there will be performance issues when Spring Boot loads a WAR package with its built-in Tomcat.

Comment From: wilkinsona

I'm afraid it's impossible to say as you haven't told us anything about your app. You may be hitting https://github.com/spring-projects/spring-boot/issues/16471. If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Comment From: zhangminxiaozhang

Sure, I will analyze it on my own based on the approximate question you provided. Thank you

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.