如何更改 grails 本地主机端口? [英] How to change grails localhost port?

查看:23
本文介绍了如何更改 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.

推荐答案

有两个选项:

  1. Config.groovy 中的 grails.serverURL"http://localhost:8080/${appName}" 更改为 http://localhost:8090/${appName}".
  2. 在命令行上使用 -Dgrails.server.port.http=8090 启动 grails.将 GRAILS_OPTS 环境变量设置为 -Dgrails.server.port.http=8090 以使其自动应用.
  1. Change grails.serverURL in Config.groovy from "http://localhost:8080/${appName}" to "http://localhost:8090/${appName}".
  2. Launch grails with -Dgrails.server.port.http=8090 on the command line. Set the GRAILS_OPTS environment variable to -Dgrails.server.port.http=8090 to have it applied automatically.

这篇关于如何更改 grails 本地主机端口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆