Hide id param in url in Grails App
问题 I have a URL that looks like /myController/myAction/id . How could I hide the id in that URL so it looks like: /myController/myAction/username [email] 回答1: Define in UrlMapping.groovy as "/myController/myAction/$username"(controller: "myController",action: "myAction") and you'll be able to get the param in controller params.username 回答2: Define in UrlMapping.groovy as "/myController/myAction/$username"(controller: "myController",action: "myAction") you'll be able to get the param in