title: Spring MVC mapping query parameters instead of URI templates values with @PathVariable
body: <pre><code>@RequestMapping(value = "/account/{id}", method = RequestMethod.GET)
  public ModelAndView getAccount(@PathVariable String id)
          throws ProfileNotFoundException {
     System.out.println(id);
     return null;
  }
  </code></pre>
  
  <p>.../account/12345 results in null</p>
  
  <p>.../account/test?id=12345 '12345' results in 12345</p>
  
  <p>Not sure how to fix this but I'd like the first link to work instead of the second.  Here is my webmvc-config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xmlns:p="http://www.springframework.org/schema/p"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans 
                          http://www.springframework.org/schema/beans/spring-beans-3.1.xsd                 
                          http://www.springframework.org/schema/context 
                          http://www.springframework.org/schema/context/spring-context-3.1.xsd                 
                          http://www.springframework.org/schema/mvc 
                          http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"&gt;
  
      &lt;context:component-scan base-package="com.twheys.lexika.web.**"
          use-default-filters="false"&gt;
          &lt;context:include-filter expression="org.springframework.stereotype.Controller"
              type="annotation" /&gt;
      &lt;/context:component-scan&gt;
  
      &lt;mvc:annotation-driven/&gt;
  
      &lt;bean id="viewResolver"
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="viewClass"
              value="org.springframework.web.servlet.view.JstlView"&gt;&lt;/property&gt;
          &lt;property name="prefix" value="WEB-INF/views/"&gt;&lt;/property&gt;
          &lt;property name="suffix" value=".jsp"&gt;&lt;/property&gt;
      &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>