Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run gradle based spring boot application in background using command line in ubuntu?

I am trying to run gradle based hibernate spring boot application in background thread.

like image 222
Pawan Kumar Rakesh Avatar asked Oct 30 '25 18:10

Pawan Kumar Rakesh


1 Answers

To run SpringBoot application with ubuntu as background application wia terminal, run below command

gradle clean build  -- TO CLEAN AND BUILD GRADLE APPLICATION
cd TO YOUR BUILD PATH(JAR FILE PATH)
java -jar YOUR_APP_JAR.jar &

Here "&" will assured that when you close your terminal, your application will not kill.

check this for '&' usages in terminal

like image 115
bharatpatel Avatar answered Nov 01 '25 08:11

bharatpatel