Given the spring mvc method like the one below.
@RequestMapping(value="/owners/{ownerId}/pets/{petId}/edit")
public String processSubmit(@PathVariable("ownerId", int ownerId,
@PathVariable("petId") int petid) {
}
Is there some way to write the method so that all the URI templates variables are passed in as a map to the handler? something along the lines of ?
@RequestMapping(value="/owners/{ownerId}/pets/{petId}/edit")
public String processSubmit(Map<String,Object> allPathVariables) {
Integer ownerId = allPathVariables.get("ownerId");
Integer petId = allPathVariables.get("petId");
}
Is there a way to put all the URI templates in a Map that is passed to a handler method?