【问题标题】:Play application stops immediately when running with Intellij configuration使用 Intellij 配置运行时播放应用程序立即停止
【发布时间】:2022-11-12 00:30:41
【问题描述】:

当运行sbt new playframework/play-scala-seed.g8 从终端编译和运行时,一切都运行良好。 但是当将项目导入 IntelliJ,添加“Play 2 App”配置并运行它时,程序运行完美但立即停止。此外,播放标志显示两次。

OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
[info] welcome to sbt 1.6.1 (Azul Systems, Inc. Java 11.0.13)
[info] loading settings for project play-scala-seed-build from plugins.sbt ...
[info] loading project definition from /Users/idanahal/projects/scalaPlayTutorial/play-scala-seed/project
[info] loading settings for project root from build.sbt ...
[info]   __              __
[info]   \ \     ____   / /____ _ __  __
[info]    \ \   / __ \ / // __ `// / / /
[info]    / /  / /_/ // // /_/ // /_/ /
[info]   /_/  / .___//_/ \__,_/ \__, /
[info]       /_/               /____/
[info] 
[info] Version 2.8.12 running Java 11.0.13
[info] 
[info] Play is run entirely by the community. If you want to keep using it please consider donating:
[info] https://www.playframework.com/sponsors
[info] 
[info]   __              __
[info]   \ \     ____   / /____ _ __  __
[info]    \ \   / __ \ / // __ `// / / /
[info]    / /  / /_/ // // /_/ // /_/ /
[info]   /_/  / .___//_/ \__,_/ \__, /
[info]       /_/               /____/
[info] 
[info] Version 2.8.12 running Java 11.0.13
[info] 
[info] Play is run entirely by the community. If you want to keep using it please consider donating:
[info] https://www.playframework.com/sponsors
[info] 

--- (Running the application, auto-reloading is enabled) ---

[info] p.c.s.AkkaHttpServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

Server started, use Cmd+P to stop

[info] p.a.i.l.c.CoordinatedShutdownSupport - Starting synchronous coordinated shutdown with ServerStoppedReason reason and 35000 milliseconds timeout
[info] p.c.s.AkkaHttpServer - Stopping Akka HTTP server...
[info] p.c.s.AkkaHttpServer - Terminating server binding for /0:0:0:0:0:0:0:0:9000
[info] p.c.s.AkkaHttpServer - Running provided shutdown stop hooks

[success] Total time: 3 s, completed 11 Jan 2022, 18:51:03

Process finished with exit code 0

我什么也没做,但它立即开始关闭。

【问题讨论】:

    标签: scala intellij-idea playframework


    【解决方案1】:

    对我来说,配置中的“启用自动重新加载”选项解决了这个问题。

    【讨论】:

    • 新手问题:你指的是什么配置?我将“启用自动重新加载”放在哪个文件中?谢谢。
    • 当配置设置为“Play 2 App”时,在“编辑配置”下。
    • 谢谢你!我有社区版本,它不支持 Play 2,所以我什至能够创建配置。已安装 Ultimate,现在一切正常(启用自动重新加载)
    【解决方案2】:

    你需要给出运行命令,比如 ~run

    【讨论】:

      【解决方案3】:

      环境变量:autoReloadPlugins=true

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-12-03
        • 2014-04-21
        • 1970-01-01
        • 1970-01-01
        • 2013-07-19
        • 2021-10-31
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多