退出腻子后如何使springboot应用程序保持活动状态 [英] How to keep springboot application alive after exiting putty

查看:87
本文介绍了退出腻子后如何使springboot应用程序保持活动状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过命令使用 putty 在我的服务器上运行我的 Spring Boot 应用程序mvn spring-boot:run 它仅在我打开 ssh 会话时运行.断开会话后是否可以使应用程序保持活动状态?或者我是否必须制作可执行的war文件并部署到我的ubunntu 14.04上安装的tomcat服务器.我知道部署启动应用程序的其他方法,但我想知道我的方法是否可行.

I am running my spring boot application on my server using putty via command mvn spring-boot:run and it runs only when I have open ssh session. Is it possible to keep application alive after I disconnect session? Or do I have to make executable war file and deploy to installed tomcat server on my ubunntu 14.04. I know others ways to deploy boot apps but I want to know if it is possible in my approach.

推荐答案

你可以在后台运行命令,像这样使用 nohup

You can run the command in the background and with nohup like so

nohup mvn spring-boot:run &

nohup mvn spring-boot:run &

执行此操作时,即使关闭 ssh 会话,应用程序也会在后台运行.

When you do this, the application runs in background even after you close ssh session.

这篇关于退出腻子后如何使springboot应用程序保持活动状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆