什么是Play Framework 2.1的“播放停止"功能? [英] What is the equivalent to 'play stop' for Play Framework 2.1?

查看:60
本文介绍了什么是Play Framework 2.1的“播放停止"功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Play 2.1的play stop等于什么?

What is the equivalent of play stop for Play 2.1?

如果我做了play start,如何彻底终止该过程?

If I did play start, how do I cleanly terminate the process?

推荐答案

如文档中所述 :

运行start命令时,Play会派生一个新的JVM并运行默认的Netty HTTP服务器.标准输出流将重定向到Play控制台,因此您可以监视其状态.

When you run the start command, Play forks a new JVM and runs the default Netty HTTP server. The standard output stream is redirected to the Play console, so you can monitor its status.

服务器的进程ID显示在引导程序中,并写入RUNNING_PID文件.要杀死正在运行的Play服务器,只需将SIGTERM发送到该进程即可正确关闭该应用程序.

The server’s process id is displayed at bootstrap and written to the RUNNING_PID file. To kill a running Play server, it is enough to send a SIGTERM to the process to properly shutdown the application.

如果键入Ctrl + D,将退出Play控制台,但是创建的服务器进程将继续在后台运行.然后关闭派生的JVM的标准输出流,并可以从logs/application.log文件中读取日志.

If you type Ctrl+D, the Play console will quit, but the created server process will continue running in background. The forked JVM’s standard output stream is then closed, and logging can be read from the logs/application.log file.

所以我认为您必须使用play run而不是play start.然后,您将可以使用 Ctrl + D 停止播放.

So I think that you have to use play run instead of play start. Then you'll be able to use Ctrl+D to stop play.

这篇关于什么是Play Framework 2.1的“播放停止"功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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