I'm trying to change default convention of controller name in Grails. My Controller Class is named LongNameInCamelCaseController
. Grails convention over configuration sets an url mapping for this controller like longNameInCamelCase
. I want this controller name in url friendly 'long-name-in-camel-case'
.
Someone already do this?
Thanks.
That's described in the docs here: http://grails.org/doc/latest/guide/theWebLayer.html#customizingUrlFormat
Add
grails.web.url.converter = 'hyphenated'
in Config.groovy
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.