【发布时间】:2013-07-26 21:56:08
【问题描述】:
我正在尝试缩短 URL 以访问我的 grails 应用程序。目前我能做到的最短时间是
http://myserver:8080/helloWorld/helloWorld/
HelloWorld 是控制器名称和应用程序名称。我能不能让它更短一些,所以它只是
http://myserver:8080/helloWorld/
我已将 URL 映射设置为
class UrlMappings {
static mappings = {
"/$controller/$action?/$id?"{
constraints {
// apply constraints here
}
}
"/"(view:"/index")
"500"(view:'/error')
}
}
【问题讨论】: