title: Use of getFlashAttributes() in Spring's RedirectAttributes
body: <p>In order to access the redirect attributes in the redirected method, we utilize the model's map, like this :</p>
  
  <pre><code>@Controller
  @RequestMapping("/foo")
  public class FooController {
  
    @RequestMapping(value = "/bar", method = RequestMethod.GET)
    public ModelAndView handleGet(Model map) {
       String some = (String) map.asMap().get("some");
    }
  
    @RequestMapping(value = "/bar", method = RequestMethod.POST)
    public ModelAndView handlePost(RedirectAttributes redirectAttrs) {
      redirectAttrs.addFlashAttributes("some", "thing");
      return new ModelAndView().setViewName("redirect:/foo/bar");
    }
  
  }
  </code></pre>
  
  <p>But, why can't we access them in this way :</p>
  
  <pre><code>      @RequestMapping(value = "/bar", method = RequestMethod.GET)
        public ModelAndView handleGet(RedirectAttributes redAttr) {
           String some = redAttr.getFlashAttributes().get("some");
        }
  </code></pre>
  
  <p>If the only purpose of adding flashAttributes is that they become available to the model in the redirected method, what's the purpose of <code>getFlashAttributes()</code> ?</p>