Skip to content

Instantly share code, notes, and snippets.

@ederrafo
Created January 13, 2023 19:46
Show Gist options
  • Save ederrafo/f7bf59f02ce00e415c283522ce1c7160 to your computer and use it in GitHub Desktop.
Save ederrafo/f7bf59f02ce00e415c283522ce1c7160 to your computer and use it in GitHub Desktop.
java flash
@PostMapping({"/expenses/plannings/insert"})
public String insertDistribution(RedirectAttributes redirectAttributes, @ModelAttribute PlanBranch planBranch,
BindingResult result) {
PlanBranchRS planBranchRS = planningService.store(planBranch);
redirectAttributes.addFlashAttribute("success", planBranchRS.isSuccess());
redirectAttributes.addFlashAttribute("message", planBranchRS.getMessage());
return "redirect:/expenses/plannings/" + planBranch.getBranch() + "/" + planBranch.getName();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment