日期:2014-05-20  浏览次数:20895 次

play framework 修改端口的方法
纯转为记录
Play 2.x - Dev Mode

For browser-reload mode:

play "run 8080"
For continuous-reload mode:

play "~run 8080"
Play 2.x - Debug Mode

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

play debug "run 8080"
Play 2.x - Prod Mode

Start in Prod mode:

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

Create a staged distribution:

play stage
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:

play dist
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