【发布时间】:2013-10-27 11:33:40
【问题描述】:
我正在开发环境中运行我的应用程序。 使用这个简单的控制器:
class MyController {
def index() {
redirect uri: '/'
}
}
由于某种原因,我被重定向到 http://localhost:8080/[:]/ 位置。
$appName 在 Config.groovy 中看起来不错。 grails.serverURL 看起来也不错。
有什么问题?
更新 1
我正在使用 grails 2.2.4
更新 2
问题在于无效的grails.serverURL 值。当我调试应用程序时,它在 Config.groovy 中有一个正确的值。当我从 servlet 方法中打印出这个值时,出于某种原因,它被设置为http://localhost:8080/[:]/。我正在使用Spring Security Core 1.2.7.3 和Spring Security UI 0.2,我认为由于某种原因 grails.serverURL 在这个插件中被覆盖了。
如何解决?
【问题讨论】:
标签: grails controller