title: Bind Path variables to a custom model object in spring
body: <p>I have a class that models my request, something like</p>
  
  <pre><code>class Venue {
      private String city;
      private String place;
  
      // Respective getters and setters.
  }
  </code></pre>
  
  <p>And I want to support a RESTful URL to get information about a venue. So I have controller method like this.</p>
  
  <pre><code>@RequestMapping(value = "/venue/{city}/{place}", method = "GET")
  public String getVenueDetails(@PathVariable("city") String city, @PathVariable("place") String place, Model model) {
      // code
  }
  </code></pre>
  
  <p>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?</p>