@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"; }
@RequestMapping(value = "/account", method = RequestMethod.POST) public String createAccount(@ModelAttribute Account account, Model model) { accountService.createCustomer(account); model.addAttribute("status", "Account successfully created!"); return "operator/index"; }