Skip to content
Advertisement

AWS – Ubuntu User Session Stops Spring Boot App

this is my first deploy on AWS. I have a Spring Boot API on an EC2 AWS instance. To run my API I run the command ‘java -jar app.jar’, this works for a while, but when the session for the ubuntu user is logged out my API stops. Then I have to run the command ‘java -jar app.jar’ and so over and over again…

JavaScript

What can I do so that my API does not stop when the ubuntu user is logged out?

Advertisement

Answer

You should run the application as service.

You can reference this articles https://dzone.com/articles/run-your-java-application-as-a-service-on-ubuntu

JavaScript
JavaScript

vi /home/ubuntu/my-webapp

JavaScript

You can find the java location with which java.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement