title: Adding Graceful shutdown in Java application
body: <p>I need to add graceful shutdown for application that will be deployed using <em><strong>kubernetes</strong></em>.</p>
  <p>I was able to find the documentation for graceful shutdown from spring boot version 2.3.0</p>
  <p><a href="https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#web.graceful-shutdown" rel="nofollow noreferrer">https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#web.graceful-shutdown</a>.</p>
  <p>There are two types of applications in which I need to add graceful shutdown</p>
  <p><em><strong>1. Spring boot application version less than 2</strong></em></p>
  <p><em><strong>2. Normal Spring applications without spring boot.</strong></em></p>
  <p>kindly suggest me the best practices and approaches . Thanks in advance</p>
  <p>Thanks,
  Manzoor</p>