title: Ensuring that two Request Mapping variables match in Spring MVC
body: <p>I have the following <code>@RequestMapping</code> within my Spring MVC controller:</p>
  
  <pre><code>@RequestMapping(value = "{personId}/rtbc-{personId}-badge.pdf", method = RequestMethod.GET)
  public ModelAndView produceBadgePdf(@PathVariable Integer personId){
      // rest of the code
  }
  </code></pre>
  
  <p>My question is: How can I ensure that the two <code>personId</code>s in the <code>@RequestMapping</code> are matching Integers? Should I just make the variable names differ? Or could I keep the variable names the same?</p>