Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

run springboot as a service linux

#how to run your springboot as a service on linux
#add a file in you /etc/systemd/system/yourjarfile.service
#start file
[Unit]
Description=SaaS Service
After=syslog.target

[Service]
Type=simple
User=root
Restart=always
RestartSec=5
ExecStart=/path/to/yourjarfile.jar
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target

#end of file
#systemctl enable yourjarfile.service
#systemctl start yourjarfile.service
#systemctl status yourjarfile.service
 
PREVIOUS NEXT
Tagged: #run #springboot #service #linux
ADD COMMENT
Topic
Name
6+1 =