@RequestMapping(value = "/deposit", method = RequestMethod.POST) public String createDeposit(@ModelAttribute DepositForm deposit, Model model) { depositService.createDeposit(deposit); model.addAttribute("status", "Deposit successfully created!"); return "operator/index"; }
@RequestMapping(value = "/deposit", method = RequestMethod.GET) public String createDepositPage(Model model) { model.addAttribute("deposit", new DepositForm()); model.addAttribute("names", accountService.getCustomersNames()); model.addAttribute("indexes", depositService.getBankIndexes()); return "operator/deposit"; }