1
我有映射:如何区分Grails的URL映射
"/$controller/$action?/$id?"{
constraints {
// apply constraints here
}
} // i used scaffolding and i think this is required by the generated stuff
'/'(controller:'home') //for the home page
'/$param1?/$param2?'(controller:'search') //for a search page
所需的URL显示在浏览器:
www.site.com/ - 家庭
www.site .com /关键字1 /关键字2 - 用这些可选关键字搜索
这似乎工作,但我的问题是: 我可以期待这是正确的,或者在某些情况下,Grails将事情混淆?
如果我使用'/ $ param1/$ param2'(controller:'search')和'/ $ param1'(controller:'search')会怎么样? – calin 2011-02-09 10:17:19