title: Missing URI template variable 'studentId' for method parameter type [java.lang.Integer] - Spring MVC
body: <p>I'm getting this error when I try to redirect to a certain view.</p>
  
  <p>In one handler method i have:</p>
  
  <pre><code>// get student ID, add it to model, and return redirect URI
  Integer studentId = student.getStudentId();
  model.addAttribute("studentId", studentId);
  return "redirect:/students/{studentId}";
  </code></pre>
  
  <p>But I'm not getting the parameter <code>studentId</code> in this handler method:</p>
  
  <pre><code>@RequestMapping(value="/{student}", method = RequestMethod.GET)
  public String getStudent(@PathVariable Integer studentId, Model model) {
  
      Student student = studentService.get(studentId);
      model.addAttribute("student", student);
  
      return "student";
  }
  </code></pre>
  
  <p>What am I missing here?</p>