What are the differences between Play run and start?

浪子不回头ぞ 提交于 2019-12-05 05:51:43
  • play run starts the play application in development mode.

    This means it runs from within the play prompt (within SBT, really), with some custom classloader magic to allow auto-reloading of classes, auto-compilation of templates, etc. This custom way of running the application is probably what prevents Tomcat from starting.

    Without some log output or stack traces from Tomcat, it is difficult to say much more about why Tomcat does not start. This is a bit similar to starting Tomcat within another container that provides isolation through custom classloaders (like... Tomcat).

    Edit: I do not know the gory details myself, but it all happens in the play run command and the reloader. It seems to be more documented in master, although I do not know if things have changed between 2.1.x and 2.2.x.

  • play start is a interactive way to run the application in production mode.

    This means it is completely identical to a call to java -cp [...] YourMainClass, except it runs interactively from the play prompt (needs Ctrl+D to detach) and not in the background (and as such it is not suitable for automated deployment).

However for real production you should prepare a standalone version with play dist command and then start it with included script as described in the documentation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!