java -jar application.jarThe only thing we're missing is the managing script. And now I want to dive into that topic.
Of course to do anything more than starting our application we need to know its PID. Spring Boot has a solution named ApplicationPidListener. To use it we need to tell SpringApplication we want to include this listener. And there are to ways to achieve that.