what the urls mapping processing order for the grails framework
"/$object/$id/$collection"
"/$object/$id/bar/list"
"/foo/$id/bar/list"
Which one will execute first. I'm getting unexpected behavior where the generic mapping seems to execute first
what the urls mapping processing order for the grails framework
"/$object/$id/$collection"
"/$object/$id/bar/list"
"/foo/$id/bar/list"
Which one will execute first. I'm getting unexpected behavior where the generic mapping seems to execute first
what do you want to achieve ?
/$object/$id/bar/list maps /foo/$id/bar/list to. But if you want any custom behavior for foo you can set constrainst for first mapping, e.g.:
/$object/$id/bar/list {
controller = "bar"
action = "list"
constraints {
object(matches: /.*[^fo].*/)
}
}
"/foo/$id/bar/list"
Regexp is not ideal but it shows basic principles
i believe the order will be
/foo/$id/bar/list // 1 value to calc
/$object/$id/bar/list // 2 value(s) to calc
/$object/$id/$collection // all unknown values
grails documentation states the strongest will take precedent, meaning whatever does not have to be calculated at runtime.