Start here. This is the direct spoken answer to practice first.
Overview
Graceful shutdown gives in-flight work a bounded chance to finish; it does not guarantee every request or task completes.
On a normal shutdown, Spring Boot stops accepting new work through the supported embedded server and gives existing requests time to complete. The grace period is controlled by the lifecycle shutdown timeout. In a deployment, the instance should become unready before or while traffic is drained, and the platform's termination grace period must be longer than the application's own shutdown window.