不知道我是否在这里正确使用术语“context path”,但是当前当我在本地运行Grails(2.3.6)应用程序时,它出现在http://localhost:8080/myapp
上。最终,我希望将其部署到http://myapp.com
的实际应用服务器上。
这可能吗?如果没有,为什么?如果是这样,怎么办?
最佳答案
在config.groovy中,只需设置:
grails.app.context = "/"
另外,您可能还应该在config.groovy中更新您的环境:
environments {
development {
grails.serverURL = "http://localhost:8080"
}
production {
grails.serverURL = "http://myapp.com"
}
}
关于grails - 如何在没有上下文路径的情况下部署Grails应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23812063/