Exemple #1
0
 // just because get is easier here. Be my guest if you want to change.
 @RequestMapping(method = RequestMethod.GET, value = "/remove/{id}")
 public String remove(@PathVariable("id") Integer id) {
   Ferias ferias = feriasRepository.findOne(id);
   feriasRepository.delete(ferias);
   return "redirect:/ferias/list";
 }
Exemple #2
0
 @RequestMapping(method = RequestMethod.GET, value = "/load/{id}")
 public ModelAndView load(@PathVariable("id") Integer id) {
   ModelAndView modelAndView = new ModelAndView("ferias/form-update");
   modelAndView.addObject("ferias", feriasRepository.findOne(id));
   return modelAndView;
 }