如何设置grails 3应用程序以使用根上下文路径? [英] how to set a grails 3 app to use a root context path?

查看:85
本文介绍了如何设置grails 3应用程序以使用根上下文路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 我试图在`conf / application.yml中为我的应用程序设置根上下文路径。 > server:
'context-path':'/'

但是,开始 grails> run-app ,我得到以下异常:



FAILURE:构建失败,出现异常。

  *出错:
任务':bootRun'的执行失败。
>进程'命令'/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin/java''以非零退出值1


解决方案

我应该更加注意从 run-app 。正确的设置是:

 服务器:
'上下文路径':''

> = Grails 3.0.3:

  server:
contextPath:''


I'm trying to set a root context path for my application in `conf/application.yml' like so:

server:
    'context-path': '/'

However, when trying to start grails> run-app, I get the following exception:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

解决方案

I should have paid more attention to the error log output from run-app. The correct setting is:

server:
    'context-path': ''

>= Grails 3.0.3:

server:
    contextPath: ''

这篇关于如何设置grails 3应用程序以使用根上下文路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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