title: RequestMappingHandlerMapping is truncating path for RestController
body: <p>I seem to be confused about how to add a RestController into my application. I'm pretty close here, but when hitting the url <code>http://localhost:8080/rest/username/test</code> I get the following in my logs.</p>
  
  <p><code>2015-10-27 20:12:23,427 26366 [http-nio-8080-exec-5] DEBUG o.s.security.web.FilterChainProxy - /rest/username/test reached end of additional filter chain; proceeding with original chain 
  2015-10-27 20:12:23,427 26366 [http-nio-8080-exec-5] DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'Rest' processing GET request for [/rest/username/test] 
  2015-10-27 20:12:23,427 26366 [http-nio-8080-exec-5] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /username/test 
  2015-10-27 20:12:23,428 26367 [http-nio-8080-exec-5] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/username/test] 
  2015-10-27 20:12:23,428 26367 [http-nio-8080-exec-5] DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Matching patterns for request [/username/test] are [/**]</code></p>
  
  <p>I found many stackoverflow pages related to truncated path variables due to "dot"(.), but my path has no "dot" and just returns a string for now.</p>
  
  <p>It seems to me that the <code>RequestMappingHandlerMapping</code> object is truncating the path when trying to find a match to an appropriate method. I am just unsure as to why, and how to get it to work correctly. </p>
  
  <p><strong>RestController</strong></p>
  
  <pre><code>@RestController 
  @RequestMapping(value = "/rest/{username}")
  public class RestController {
  
  @RequestMapping(value = "/test", method = RequestMethod.GET)
  public String test() {
      return "Rest controller data.";
  }
  
  }
  </code></pre>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Rest&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p><strong>rest-servlet.xml</strong></p>
  
  <pre><code>&lt;!-- mvc config --&gt;
  &lt;mvc:annotation-driven/&gt;
  
  &lt;!-- scan for controller --&gt;  
  &lt;context:component-scan base-package="abnd.pue.rest"/&gt;
  </code></pre>