She*_*dam 10 playframework typesafe-activator
如何在Play 2.5.9中将默认端口从9000更改为9001?
试过以下步骤
但是这个工作 激活器运行-Dhttp.port = 9001 -Dhttp.address = 127.0.0.1
我们可以从application.conf更改它而不是从命令行指定端口吗?
从版本2.5开始,您可以设置Play应用程序的端口,application.conf 但只有在生产模式下运行应用程序时才会使用此设置.
play.server {
# These settings only apply when running in production mode (e.g. when using the stage/dist task)
# To apply these settings in dev mode see:
# https://www.playframework.com/documentation/2.5.x/ConfigFile#Using-with-the-run-command
# https://groups.google.com/d/msg/play-framework/-EE28jmb4Uw/MBRQvAhhCwAJ
# https://www.playframework.com/documentation/2.5.x/ProductionConfiguration
# ~~~~~
http {
address = 127.0.0.1
port = 9000
}
#https {
# address = 127.0.0.1
# port = 9000
#}
}
Run Code Online (Sandbox Code Playgroud)
要在开发模式下设置端口,您必须坚持使用build.sbt RP- postet中的设置.
| 归档时间: |
|
| 查看次数: |
5649 次 |
| 最近记录: |