grails - 更改Web项目的URL?

标签 grails web intellij-idea

我正在将IntelliJ Idea用于Web项目,当我运行它时,URL为

http://localhost:8080/MyProjectName/

有办法改变吗?喜欢,
http://localhost:8080/OtherName

要不就
http://localhost:8080/ 

谢谢

最佳答案

对于Grails 3.X,您需要将其添加到grails-app/conf/application.yml:

server:
    contextPath: /OtherName

在Grails 2.X中,将其添加到grails-app/conf/Config.groovy:
grails.app.context = "/OtherName"

关于grails - 更改Web项目的URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40353333/

相关文章:

spring - Grails Spring Security UI请求映射配置

grails - GGTS不接受来自SDKman安装的较新grails版本

Java SWT 浏览器 : Waiting till dynamic page is fully loaded

intellij-idea - 用引号括起多行

intellij-idea - 在IntelliJ IDEA中调试Dart

grails - 独立 GORM 脚本当前的依赖项是什么?

grails - Grails中的默认错误消息不在 View 中呈现

web - 谷歌不索引我的帖子

html - margin 和仓位的区别

java - 需要有关 NoSuchMethodError : com. google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor 的帮助;在 IntelliJ 中