我是新玩的框架。我已经下载了最新版本(2.1.1)我试图按照视频教程http://www.playframework.com/中的步骤进行操作,但是当我对代码进行任何更改时,保存它然后刷新localhost:9000 - 它仍然显示旧页面。我也试过:“玩干净”,“玩编译”,但仍然没有结果。有什么建议? 我正在使用javac 1.7.0._21并通过eclipse进行更改。
答案 0 :(得分:2)
尝试使用〜run ,而不是
[My first application] $ ~ run
每次进行更改时都应重新编译代码。以下页面包含更多信息:http://www.playframework.com/documentation/2.1.1/PlayConsole
答案 1 :(得分:0)
我使用intellij作为编辑器,在进行编辑和刷新之前,我使用以下命令启动应用程序:
play debug run
你应该看到这样的事情......
....
[info] Done updating.
--- (Running the application from SBT, auto-reloading is enabled) ---
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
答案 2 :(得分:0)
在 build.sbt 中,更改此行:
fork in run := true
到
fork in run := false