title: Spring Rest path Conflict with @PathVariable and @MatrixVariable
body: <p>I'm using Spring 4.1.9.RELEASE</p>
  
  <p>Configured next Rest Controller. </p>
  
  <p>And founded what /get/{id} somehow hide mapping for /get/matrix/{vars}</p>
  
  <p>When i was trying call it by next url <a href="http://localhost:8080/testMatrixVariables/get/matrix/;v1=1;v2=2;v3=3" rel="nofollow noreferrer">http://localhost:8080/testMatrixVariables/get/matrix/;v1=1;v2=2;v3=3</a>
  I've got from debug log </p>
  
  <p>org.springframework.beans.TypeMismatchException: Failed to convert value of type [java.lang.String] to required type [long]; nested exception is java.lang.NumberFormatException: For input string: "matrix"</p>
  
  <p>Seems it's try parse {id} from my url but not /get/matrix/{vars}</p>
  
  <p>I the same time next call works perfect
  <a href="http://localhost:8080/testMatrixVariables/getMatrix/;v1=1;v2=2;v3=3" rel="nofollow noreferrer">http://localhost:8080/testMatrixVariables/getMatrix/;v1=1;v2=2;v3=3</a>
  and 
  <a href="http://localhost:8080/testMatrixVariables/get/1" rel="nofollow noreferrer">http://localhost:8080/testMatrixVariables/get/1</a>
  as well works fine
  and 
  <a href="http://localhost:8080/testMatrixVariables/get/anotherPathVariable/2" rel="nofollow noreferrer">http://localhost:8080/testMatrixVariables/get/anotherPathVariable/2</a>
  also works</p>
  
  <p>So problem only when we have conflict between @PathVariable and @MatrixVariable</p>
  
  <p><a href="http://localhost:8080/testMatrixVariables/get/matrix/;v1=1;v2=2;v3=3" rel="nofollow noreferrer">http://localhost:8080/testMatrixVariables/get/matrix/;v1=1;v2=2;v3=3</a></p>
  
  <pre><code>@RestController
  @RequestMapping(value = "/testMatrixVariables")
  public class TestController {
  
      @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
      public
      @ResponseBody
      ResponseEntity&lt;String&gt; getByPathVariable(@PathVariable("id") long v1) {
          return ResponseEntity.ok("ok" + v1);
      }
  
      @RequestMapping(value = "/get/anotherPathVariable/{id}", method = RequestMethod.GET)
      public
      @ResponseBody
      ResponseEntity&lt;String&gt; getAnotherPathVariableByPathVariable(@PathVariable("id") long v1) {
          return ResponseEntity.ok("ok" + v1);
      }
  
  
      @RequestMapping(value = "/getMatrix/{vars}", method = RequestMethod.GET)
      public @ResponseBody ResponseEntity&lt;String&gt; getMatrix(
              @MatrixVariable(pathVar = "vars", required = true) String v1,
              @MatrixVariable(pathVar = "vars", required = true) String v2,
              @MatrixVariable(pathVar = "vars", required = true) String v3) {
          return ResponseEntity.ok("ok" + v1 + v2 + v3);
      }
  
      @RequestMapping(value = "/get/matrix/{vars}", method = RequestMethod.GET)
      public @ResponseBody ResponseEntity&lt;String&gt; getGetMatrix(
              @MatrixVariable(pathVar = "vars", required = true) String v1,
              @MatrixVariable(pathVar = "vars", required = true) String v2,
              @MatrixVariable(pathVar = "vars", required = true) String v3) {
          return ResponseEntity.ok("ok" + v1 + v2 + v3);
      }
  
  }
  </code></pre>