I am using grails 3 and I would like to know how the controller names are resolved. Apparently, if the UrlMappings.groovy
contains
static mappings = {
"/test"(controller: 'test', action: 'index')
}
Then a class TestController
is needed. However, if I have a controller named TestValueController
, then the mapping
static mappings = {
"/test"(controller: 'testvalue', action: 'index')
}
does not work. How can I use a controller with a camel case name? More generally, for a controller named XController, which string should be used in the mappings
section?
可以正常工作,只是区分大小写testvalue
应该是testValue
。
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.