我已经创建了入门应用程序 http://www.lagomframework.com/documentation/1.0.x/GettingStarted.html
并且系统启动良好。
[info] Service locator is running at http://localhost:8000
[info] Service gateway is running at http://localhost:9000
[info] application - Signalled start to ConductR
[info] application - Signalled start to ConductR
[info] Service hellostream-impl listening for HTTP on 0:0:0:0:0:0:0:0:26230
[info] Service helloworld-impl listening for HTTP on 0:0:0:0:0:0:0:0:24266
Run Code Online (Sandbox Code Playgroud)
如何更改服务网关的主机和端口以侦听 0.0.0.0:8080 ?
主机名似乎没问题。可以从另一台机器访问该服务。该localhost是硬编码。
def serviceGatewayAddress: URI = {
new URI(s"http://localhost:${gateway.address.getPort}")
}
Run Code Online (Sandbox Code Playgroud)
要配置服务网关的端口,请lagomServiceGatewayPort在 main 中设置属性build.sbt。
lagomServiceGatewayPort in ThisBuild := 8080
Run Code Online (Sandbox Code Playgroud)| 归档时间: |
|
| 查看次数: |
1032 次 |
| 最近记录: |