【问题标题】:play 2.1.1 framework does not recompile (refresh)play 2.1.1 框架不重新编译(刷新)
【发布时间】:2013-05-05 13:12:03
【问题描述】:

我是新手玩框架。我已经下载了最新版本 (2.1.1) 我正在尝试按照视频教程 http://www.playframework.com/ 中的步骤进行操作,但是当我对代码进行任何更改时,保存它然后刷新 localhost:9000 - 它仍然显示旧页面.我也试过:“play clean”,“play compile”,还是没有结果。有什么建议么? 我正在使用 javac 1.7.0._21 并通过 eclipse 进行更改。

【问题讨论】:

  • 您是否在 Play SBT 控制台上看到类似这样的消息:Compiling xx Scala sources to yourprojectpath\target\scala-2.10\classes... 当您使用 play run 命令时,您应该会看到页面的更改。
  • 你解决了这个问题了吗?我也遇到了同样的问题。

标签: playframework recompile


【解决方案1】:

尝试使用~运行,而不是即

[My first application] $ ~ run

这应该在您每次进行更改时重新编译代码。以下页面包含更多信息:http://www.playframework.com/documentation/2.1.1/PlayConsole

【讨论】:

    【解决方案2】:

    我使用 intelij 作为我的编辑器,在进行编辑和刷新之前,我使用以下命令启动应用程序:

    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...)
    

    【讨论】:

      【解决方案3】:

      在您的 build.sbt 中,更改此行:

      fork in run := true
      

      fork in run := false
      

      【讨论】:

        猜你喜欢
        • 2015-10-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多