@RequestMapping(value = "/edit", method = RequestMethod.POST) public void update(ModelMap modelMap, @Valid UserDashlet entity, BindingResult result) { service.saveModel(modelMap, entity, result); }
@RequestMapping(value = "/new", method = RequestMethod.POST) public String create(ModelMap modelMap, @Valid UserDashlet entity, BindingResult result) { return service.saveModel(modelMap, entity, result) ? "redirect:edit?id=" + entity.getId() : null; }