從終端運行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
我什么也沒做,但它立即開始關閉。
uj5u.com熱心網友回復:
對我來說,配置中的“啟用自動重新加載”選項解決了這個問題。
uj5u.com熱心網友回復:
你需要給出運行命令,比如 ~run
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/419153.html
標籤:
