NOTE
Starting a Spring Boot Application
The application entry point, SpringApplication, configuration sources, profiles, lifecycle hooks, and graceful startup/shutdown.
This is a historical learning note and may contain outdated or incomplete understanding.
A typical Boot application delegates from main to SpringApplication.run(...), which prepares an application environment/context and starts the configured application type.
Startup behavior is influenced by command-line arguments, property sources/profiles, application listeners/initializers, auto-configuration, and application beans.
Keep startup tasks bounded and failure-visible. Long blocking initialization increases deployment recovery time; services should also support graceful shutdown so in-flight work and resource cleanup have a clear lifecycle.