简体   繁体   English

Play框架中“play run”和“play akka start”命令之间的区别

[英]Difference between `play run` and `play akka start` commands in the Play Framework

I am a bit confused and would like to an explanation. 我有点困惑,想解释一下。

I am using Java Play 2 with Akka actors. 我正在使用Java Play 2和Akka演员。 I start the system by using play run . 我使用play run启动系统。

However, I just saw a video that used the command: 但是,我刚刚看到一个使用该命令的视频:

play akka start 

to start a Play framework that supports Akka. 启动支持Akka的Play框架。 Is this required for the Play 2? Play 2需要这个吗?

Thanks all! 谢谢大家!

Play 2.0 doesn't use akka as a command line argument as far as I know (at least its not present in sbt's help command, and I got an error trying to use it). 据我所知,Play 2.0并没有使用akka作为命令行参数(至少它没有出现在sbt的help命令中,我在尝试使用它时出错了)。 The difference between play run and play start is the following: play runplay start之间的区别如下:

play run - starts the application in debug mode, with automatic recompilation of classes (if they are changed and you'll refresh the browser's window, your app will be recompiled) This is for development. play run - 在调试模式下启动应用程序,自动重新编译类(如果它们被更改,你将刷新浏览器的窗口,你的应用程序将被重新编译)这是用于开发。

play ~run - same as above, with that difference, the recompilation process starts as soon as changes in the files are detected (doesn't wait for browser's refresh) play ~run - 与上面相同,只要有差异,只要检测到文件中的更改(不等待浏览器刷新),重新编译过程就会启动

play start - starts the application in production mode, no recompiling, much better performance, this is intended for everyday running of the application. play start - 在生产模式下启动应用程序,不重新编译,性能更好,这适用于应用程序的日常运行。

For final production version it's best option to prepare standalone version of your application. 对于最终生产版本,最好选择准备应用程序的独立版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM