【发布时间】:2011-11-20 21:56:34
【问题描述】:
在游戏控制台上发出“运行”命令时,如何更改游戏框架在开发模式下使用的默认端口。
这适用于 playframework 2.0 beta。
在命令行或 application.conf 中使用 http.port 配置参数似乎没有任何效果:
C:\dev\prototype\activiti-preso>play run --http.port=8080
[info] Loading project definition from C:\dev\prototype\activiti-preso\project
[info] Set current project to activiti-preso (in build file:/C:/dev/prototype/activiti-preso/)
Windows, really? Ok, disabling colors.
--- (Running the application from SBT, auto-reloading is enabled) ---
[error] org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:9000
[error] Use 'last' for the full log.
【问题讨论】:
-
@PereVillega 这很有趣,因为这是真的:github.com/playframework/playframework/blob/…
-
在我看到“Windows,真的吗?”之后我不得不让我的 Windows 使用同事检查它是否仍然这样做。我们使用的是 2.2.0,它不再显示该消息,但它确实禁用了颜色。我怀疑它只是在测试版中。
-
将 PlayKeys.devSettings := Seq("play.server.http.port" -> "9001") 放入 build.sbt
标签: playframework port playframework-2.0