play framework 修改端口的方法

本文详细介绍了 Play2.x 的开发模式,包括 DevMode、DebugMode、ProdMode 等,并提供了相应的启动命令和使用场景说明。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

纯转为记录
[color=red]Play 2.x - Dev Mode[/color]

For browser-reload mode:

play "run 8080"
For continuous-reload mode:

play "~run 8080"
[color=red]Play 2.x - Debug Mode[/color]

To run in debug mode with the http listener on port 8080, run:

play debug "run 8080"
[color=red]Play 2.x - Prod Mode
[/color]
Start in Prod mode:

play "start -Dhttp.port=8080"
Play 2.x - Staged Distribution

Create a staged distribution:

[color=red]play stage[/color]
For Play 2.0.x and 2.1.x use the target/start script (Unix Only):

target/start -Dhttp.port=8080
For Play 2.2.x use the appropriate start script in the target/universal/stage/bin directory:

target/universal/stage/bin/[appname] -Dhttp.port=8080
With Play 2.2.x on Windows:

target\universal\stage\bin\[appname].bat -Dhttp.port=8080
Play 2.x - Zip Distribution

To create a zip distribution:

[color=red]play dist[/color]
For Play 2.0.x and 2.1.x use the start script (Unix Only) in the extracted zip:

start -Dhttp.port=8080
For Play 2.2.x use the appropriate script in the [appname]-[version]/bin directory:

[appname]-[version]/bin/[appname] -Dhttp.port=8080
With Play 2.2.x on Windows:

[appname]-[version]\bin\[appname].bat -Dhttp.port=8080
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值