Пример #1
0
 @RequestMapping(value = "/update", method = RequestMethod.POST)
 public String updateDo(Translator translator) {
   translatorRepository.update(translator);
   return "redirect:" + translator.getNo();
 }
Пример #2
0
 @RequestMapping(value = "/update", method = RequestMethod.GET)
 public String update(Translator translator, Model model) {
   translator = translatorRepository.get(translator.getNo());
   model.addAttribute("translator", translator);
   return "translator/update";
 }