I want to have the following method:
@ExceptionHandler(MyRuntimeException.class) public String myRuntimeException(MyRuntimeException e, RedirectAttributes redire
Since Spring 4.3.5 (SPR-14651) you can use stright away your first aproach:
@ExceptionHandler(MyRuntimeException.class) public String myRuntimeException(MyRuntimeException e, RedirectAttributes redirectAttrs){ redirectAttrs.addFlashAttribute("error", e); return "redirect:someView"; }