javalinuxspring-bootjava-service-wrapper

What is advantage of using service wrapper in Spring boot instead of jar running?


Spring document has mentioned about service wrapper in http://docs.spring.io/spring-boot/docs/current/reference/html/deployment-install.html.

On production, we can use java -jar [x].jar to run our application which it's more easier.

What are those advantage to use service wrapper ?


Solution

  • What is advantage of using service wrapper in Spring boot instead of jar running?

    If the application should restart automatically when the server reboots because of power failure, hardware failure or some other temporary condition then the service approach primarily has the advantage that you don't have to login to the machine to start the jar. Which is useful if it's production software and 3 am when the janitor pulls the server plug to vacuum.