grails - Grails 3.0应用程序在意外路径上启动。怎么修?

标签 grails grails-3.0

我只是开始使用Grails 3.0 RC1,并发现了小问题。执行run-app命令后,我的应用程序位于路径localhost:8080上,但在Grails 2.x上,默认情况下正确的路径为localhost:8080 / appname /。在Grails 3.0的文档中,我看到了相同的内容,应用程序应在localhost:8080 / appname /上启动。为什么在我的情况下/ appname /后缀丢失了?我有一个非常简单的测试应用程序,并且没有调优配置文件。如何解决此问题?

最佳答案

根据docs of springboot,您将配置:

server.context-path= # the context path, defaults to '/'

例如。添加您的application.yml:
server:
    'context-path': '/lol'

要在上下文中访问您的应用,哈哈

关于grails - Grails 3.0应用程序在意外路径上启动。怎么修?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29110598/

相关文章:

web-applications - Grails 是否适合复杂的应用程序?

spring - 设置 knockoutJS View 模型以绑定(bind)到一对多属性

grails - 如何使用拦截器为Grails 3中的每种方法应用不同的安全性约束

grails - 使用 Grails 3 应用程序在 doWithSpring 闭包中获取应用程序配置

grails - grails/gradle如何在没有版本说明的情况下下载依赖项

security - Grails 如何记录安全插件事件

hibernate - Grails - 查找用户今天创建的所有帖子

Grails 3 单元测试 : How do you do mockFor, createMock,以及 Grails 3 中的需求?

grails - 删除之前与多对多关系

intellij-idea - 从启用自动重新加载的 IntelliJ 启动 Grails 3 应用程序