@RequestMapping(value = "/update", method = RequestMethod.POST) public String updateDo(Translator translator) { translatorRepository.update(translator); return "redirect:" + translator.getNo(); }
@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"; }