📌  相关文章
📜  将 springboot 作为服务运行 linux - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:24.781000             🧑  作者: Mango

代码示例1
#how to run your springboot as a service on linux
#add a file in you /etc/systemd/system/yourjarfile.service
#start file
[Unit]
Description=WFM 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