title: PathVariable in Spring Controller
body: <p>I'm trying to map the url /locations/{locationId}/edit.html - that seems to work with this code:</p>
  
  <pre><code>@Controller
  @RequestMapping( "/locations" )
  public class LocationController
  {
    @RequestMapping( value = "/{locationId}/edit.html", method = RequestMethod.GET )
    public String showEditForm( Map&lt;String, Object&gt; map, @PathVariable int locationId )
    {
      map.put( "locationId", locationId );
      return "locationform";
    }
  }
  </code></pre>
  
  <p>Call the mentioned url results in an exception:</p>
  
  <pre><code>java.lang.IllegalArgumentException: Name for argument type [int] not available, and parameter name information not found in class file either.
  </code></pre>
  
  <p>Am I using the @PathVariable Annotation in a wrong way?</p>
  
  <p>How to use it correctly?</p>