如何部署具有不同上下文路径的Grails应用程序 [英] How to deploy a grails app with a different context path

查看:125
本文介绍了如何部署具有不同上下文路径的Grails应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在grails文件中可以为Grails应用程序定义不同的上下文路径以在Tomcat上运行? (例如,该项目称为MyApplication ,但我想将其引用为 / myapp )感谢

Where in the grails files can I define a different context path for a grails app to run on Tomcat ? (For instance, the project is called MyApplication, but I want to reference it as /myapp) Thanks

推荐答案

如果您部署到生产最简单的方法是将war文件重命名为myapp.war。你也可以在你的application.properties中添加一些类似的东西,以调整你在使用grails时访问应用程序的路径run-app

If your deploying to production the easiest way is to just rename the war file to myapp.war. You can also add something like the following to your application.properties to ajust the path you go to in order to access your application when using grails run-app

app.context=/myapp

这篇关于如何部署具有不同上下文路径的Grails应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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