8.4.1 Mapping to Controllers and Actions - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.1.9
8.4.1 Mapping to Controllers and Actions
To create a simple mapping simply use a relative URL as the method name and specify named parameters for the controller and action to map to:"/product"(controller: "product", action: "list")
/product
to the list
action of the ProductController
. Omit the action definition to map to the default action of the controller:"/product"(controller: "product")
"/product" { controller = "product" action = "list" }
group
method:group "/product", { "/apple"(controller:"product", id:"apple") "/htc"(controller:"product", id:"htc") }
group
url mappings:group "/store", { group "/product", { "/$id"(controller:"product") } }
"/hello"(uri: "/hello.dispatch")