0
Ich versuche, die Index-Aktion aufrufen und rufen Sie die Zählung Aktion und ich weiß nicht warum. Dies ist der Code in der urlmapping
Grails URL-Mapping tun falsche Aktion Anruf
group "/api/product",{
"?"(controller: 'product', action: 'save', method: 'POST')
"?"(controller: 'product', action: 'index', method: 'GET')
"/$id?"(controller: 'product', action: 'delete', method: 'DELETE')
"/$id?"(controller: 'product', action: 'update', method: 'PUT')
"/$id?"(controller: 'product', action: 'show', method: 'GET')
"/count?"(controller: 'product', action: 'count', method: 'GET')
}
Warum gibt es eine? in "/ zählen?" Sie machen das Wort "count" optional, damit es passt, wenn nichts da ist. In der Tat, ich denke, du willst das loswerden? in allen $ id auch. – billjamesdev