title: What is the difference between @ModelAttribute, model.addAttribute in spring?
body: <p>i am new Spring learner.i'm really confused about what is the difference between two concept:</p>
  
  <ol>
  <li>@ModelAttribute </li>
  <li>model.addAttribute</li>
  </ol>
  
  <p>in below there are two "user" value.Are these same thing?Why should I use like this?
  Thank you all</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET)
  public String setupForm(ModelMap model) {
      model.addAttribute("user", new User());
      return "editUser";
  }
  
  @RequestMapping(method = RequestMethod.POST)
  public String processSubmit( @ModelAttribute("user") User user, BindingResult result, SessionStatus status) {
      userStorageDao.save(user);
      status.setComplete();
      return "redirect:users.htm";
  }
  </code></pre>