title: Spring boot app gracefully catch the SIGTERM signal and invoke the predestroy method
body: <p>I have a spring boot application which needs to clear or clean up the resources when we kill the process using kill pid. @predestroy annotated method is not working and not getting called. Please suggest how can we catch the SIGTERM and invoke the predestroy method</p>