title: Could Spring MVC call @ModelAttribute after @RequestMapping?
body: <p>I have a controller like this:</p>
  
  <pre><code>@Controller
  public class HomeController {
  
      @RequestMapping(value = "/update", method = RequestMethod.POST)
      public String update(@RequestParam("user") User user, ModelMap model){
          SaveUserToDatabase(user);
          return "index";
      }
  
      @ModelAttribute("user")
      String getUser() {
          return LoadCurrentUserFromDataBase();
      }
  }
  </code></pre>
  
  <p>In short, my views would render <code>user</code> in almost <strong>every</strong> actions in <code>HomeController</code>,
  but I don't want to code:</p>
  
  <pre><code>model.addAttribute("user", LoadCurrentUserFromDataBase())
  </code></pre>
  
  <p>in every actions, instead I'm seeking a way like <code>@ModelAttribute</code> to expose <code>user</code> to all my views.</p>
  
  <p>However, according to the docs, <code>@ModelAttribute</code> methods in a controller are invoked <strong>before</strong> <code>@RequestMapping</code> methods, within the same controller.</p>
  
  <p>As to my code, <code>getUser</code> is called before <code>update</code>, but i'd like to get the updated user.</p>
  
  <p>Is there a way to expose the <code>user</code> attribute <strong>after</strong> actions without explicitly call <code>model.addAttribute</code> in every actions?</p>