title: Spring boot redirectAttributes.addFlashAttribute not preserving the value in the immediate redirect
body: <p>I have a controller class which implements GET-POST-GET redirect pattern. I have tried to use addFlashAttribute in the POST request and redirecting to GET but the model object in GET does not contain the set value. Here is my code:</p>
  
  <pre><code>@Controller
  @RequestMapping("/eg")
  public class Example extends AbstractBaseController {
  
  @RequestMapping(value = "/account", method = RequestMethod.GET)
  public String renderFavouriteView(
          HttpServletRequest request,
          HttpServletResponse response,
          ExtendedModelMap modelMap,
          @ModelAttribute("result") String postResult) {
  
  
      modelMap.addAttribute("result", postResult); //postResult is empty
  
      return "account.ftl";
  }
  
  @RequestMapping(value = "/account", method = RequestMethod.POST)
  public String handleFavouriteView(
          AccountForm accountForm,
          HttpServletRequest request,
          HttpServletResponse response,
          ExtendedModelMap modelMap,
          RedirectAttributes redirectAttributes) {
  
      ServiceResult serviceResult = myAccountService.createAccount(accountForm);
  
      if (!serviceResult.isSuccess()) {
          redirectAttributes.addFlashAttribute("result", "Done");
      } else {
  
          redirectAttributes.addFlashAttribute("result", "Failed");
      }
  
      Map&lt;String,?&gt; m = redirectAttributes.getFlashAttributes(); // present here.
  
      return "redirect:/eg/account";
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Please let me know, if I am missing something here.</p>