How can I get spring-boot to run forever on ubuntu?

前端 未结 2 844
难免孤独
难免孤独 2021-02-08 15:44

I\'m trying to run spring-boot on a vm and have nginx proxy all request towards it. I\'ve got this working but when I run:

相关标签:
2条回答
  • 2021-02-08 16:22

    To run a command even after You logout you can use nohup command.

    nohup stands for "no hangup." nohup is a POSIX command to ignore the hangup signal. The hangup signal is, by convention, the way a terminal warns dependent processes of logout.

    https://en.wikipedia.org/wiki/Nohup

    http://linux.101hacks.com/unix/nohup-command/

    Your command will look somewhat like

    nohup mvn spring-boot:run &
    
    0 讨论(0)
  • 2021-02-08 16:35

    If you are running you application in ubuntu, you can use nohup and & to run your process in background. It is simple and I hope it will solve your problem

    nohup mvn spring-boot:run &
    

    http://www.cyberciti.biz/tips/nohup-execute-commands-after-you-exit-from-a-shell-prompt.html

    0 讨论(0)
提交回复
热议问题