9.1.2 Mapping to REST resources - Reference Documentation
Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari
Version: 3.0.12
9.1.2 Mapping to REST resources
If you prefer to keep the declaration of the URL mapping in yourUrlMappings.groovy
file then simply removing the uri
attribute of the Resource
transformation and adding the following line to UrlMappings.groovy
will suffice:"/books"(resources:"book")
"/books"(resources:"book") { "/publisher"(controller:"publisher", method:"GET") }
/books/1/publisher
.A more detailed explanation on creating RESTful URL mappings can be found in the URL Mappings section of the user guide.