如何使用 playframework2.4(Scala) 在 application.conf 中设置 http.port
How can I set http.port in application.conf by using playframework2.4(Scala)
我可以使用 playframework1.2.7 在 applicaton.conf 中设置 http.port
像这样
http.port = 9020
jpda.port = 8020
还有jdpa.port.
但是在play2.4.
我不能像这样在 application.conf 中设置 http.port
。
当我运行这个项目时,我知道我可以这样做。
activator "run 9020"
但是对我来说太麻烦了
如果你有什么想法,
请分享您的想法。
您不能在 运行 模式下在 aaplication.conf 中指定端口(但这可以在部署时使用)。
In run mode the HTTP server part of Play starts before the application has been compiled. This means that the HTTP server cannot access the application.conf file when it starts. If you want to override HTTP server settings while using the run command you cannot use the application.conf file. Instead, you need to either use system properties or the devSettings setting shown above.
另请查看完整的服务器配置选项
https://www.playframework.com/documentation/2.4.x/ProductionConfiguration#Server-configuration-options
我可以使用 playframework1.2.7 在 applicaton.conf 中设置 http.port 像这样
http.port = 9020
jpda.port = 8020
还有jdpa.port.
但是在play2.4.
我不能像这样在 application.conf 中设置 http.port
。
当我运行这个项目时,我知道我可以这样做。
activator "run 9020"
但是对我来说太麻烦了
如果你有什么想法, 请分享您的想法。
您不能在 运行 模式下在 aaplication.conf 中指定端口(但这可以在部署时使用)。
In run mode the HTTP server part of Play starts before the application has been compiled. This means that the HTTP server cannot access the application.conf file when it starts. If you want to override HTTP server settings while using the run command you cannot use the application.conf file. Instead, you need to either use system properties or the devSettings setting shown above.
另请查看完整的服务器配置选项
https://www.playframework.com/documentation/2.4.x/ProductionConfiguration#Server-configuration-options