title: Spring boot shut down application gracefully
body: <p>What is the best way to gracefully shut down the spring boot application(Spring boot - 2.4.9 version) ?</p>
  <p>should I register shut down hook?
  applicationContext.registerShutdownHook();</p>
  <p>Will below be sufficient ? I am in understanding that below does shut down container gracefully
  System.exit(SpringApplication.exit(appContext, () -&gt; 0));</p>