I have a class that models my request, something like
class Venue {
private String city;
private String place;
// Respective getters and setters.
}
And I want to support a RESTful URL to get information about a venue. So I have controller method like this.
@RequestMapping(value = "/venue/{city}/{place}", method = "GET")
public String getVenueDetails(@PathVariable("city") String city, @PathVariable("place") String place, Model model) {
// code
}
Is there a way, I can say in spring to bind my path variables to the model object (in this case Venue) instead of getting every individual parameter?