运行 Intellij 配置时播放应用程序立即停止
Play application stops immediately when running with Intellij configuration
当 运行 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
我什么也没做,但它立即开始关闭。
对我来说,配置中的“启用自动重新加载”选项解决了这个问题。
你需要给 运行 命令,比如 ~运行
当 运行 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
我什么也没做,但它立即开始关闭。
对我来说,配置中的“启用自动重新加载”选项解决了这个问题。
你需要给 运行 命令,比如 ~运行