如何更改 grails 本地主机端口? [英] How to change grails localhost port?
本文介绍了如何更改 grails 本地主机端口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是 grails 2.0.4.我想对本地主机使用端口:8090 而不是 8080.因此需要帮助将端口永久更改为 8090.
I'm using grails 2.0.4. And I want to use port:8090 instead of 8080 for localhost. So need help to change the port to 8090 permanently.
推荐答案
有两个选项:
- 将
Config.groovy
中的grails.serverURL
从"http://localhost:8080/${appName}"
更改为http://localhost:8090/${appName}"
. - 在命令行上使用
-Dgrails.server.port.http=8090
启动 grails.将GRAILS_OPTS
环境变量设置为-Dgrails.server.port.http=8090
以使其自动应用.
- Change
grails.serverURL
inConfig.groovy
from"http://localhost:8080/${appName}"
to"http://localhost:8090/${appName}"
. - Launch grails with
-Dgrails.server.port.http=8090
on the command line. Set theGRAILS_OPTS
environment variable to-Dgrails.server.port.http=8090
to have it applied automatically.
这篇关于如何更改 grails 本地主机端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文