title: How to shutdown a Spring Boot Application in a correct way?
body: <p>In the Spring Boot Document, they said that 'Each SpringApplication will register a shutdown hook with the JVM to ensure that the ApplicationContext is closed gracefully on exit.'</p>
  
  <p>When I click <code>ctrl+c</code> on the shell command, the application can be shutdown gracefully. If I run the application in a production machine, I have to use the command 
  <code>java -jar ProApplicaton.jar</code>. But I can't close the shell terminal, otherwise it will close the process.</p>
  
  <p>If I run command like <code>nohup java -jar ProApplicaton.jar &amp;</code>, I can't use <code>ctrl+c</code> to shutdown it gracefully.</p>
  
  <p>What is the correct way to start and stop a Spring Boot Application in the production environment?</p>