从 urlmapping 跟踪 $controller、$action、$id

Trace $controller, $action, $id from urlmapping

有没有办法从

中记录 urlmapping
static mappings = {
    "/$controller/$action?/$id?"{
        constraints {
            // apply constraints here
        }
    }

    "/"(view:"/index")
    "500"(view:'/error')
}

需要追踪$controller、$action、$id。

在拦截器中,您可以引用 controllerNameactionNameparams.id 并使用该信息做任何您想做的事情,包括记录它。