title: Matching anything in Spring RequestMapping
body: <p>On Spring MVC rest service I am having issues trying to match anything that is beyond my configured RequestMapping value.</p>
  
  <p>So for e.g. I have this:</p>
  
  <pre><code>@RequestMapping(value = "{configKey}/{arguments:.*}", method = RequestMethod.GET)
  </code></pre>
  
  <p>Which says that match anything that is beyond the second path variable. The problem is that this e.g. works ok with:</p>
  
  <pre><code>get("/test/document")
  </code></pre>
  
  <p>while this ends up with 404:</p>
  
  <pre><code>get("/test/document/download")
  </code></pre>
  
  <p>It is weird that Spring can't handle this regex. I actually tried a lot of solutions, but none of them worked.</p>
  
  <p>Previously I had this configuration on JAX-RS:</p>
  
  <pre><code>@Path("/{configKey}/{arguments:.*}")
  </code></pre>
  
  <p>And everything was good, but now I am migrating and having this issue.</p>
  
  <p>Does anyone know what's going on and how to fix this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Adding <code>{configKey}/**</code> - doesn't work</p>
  
  <p>Adding <code>{configKey}/{arguments}/**</code> works, but for e.g. if I call:</p>
  
  <p><code>get("/test/document/download")</code> I get only <code>test</code> as my config key and <code>document</code> as arguments. In the arguments I expect to get all what's beyond the <code>{configKey}</code>. Which can be anything for e.g. it should work in any case:</p>
  
  <pre><code>get("/test/document")
  get("/test/document/download")
  get("/test/document/download/1")
  get("/test/document/download/1/2")
  get("/test/whatever/xxx/1/2/etc")
  </code></pre>
  
  <p>Which was working with config for JAX-RS: <code>@Path("/{configKey}/{arguments:.*}")</code> </p>