@RequestMapping(value = "/{tagId}/delete", method = RequestMethod.POST)? ? public String delete(@PathVariable String tagId, RedirectAttributes redirectAttributes) {? ? ? ? try {? ? ? ? ? ? tagRepository.delete(tagId);? ? ? ? ? ? toast(redirectAttributes, message(Consts.Messages.DELETE_SUCCESSFULLY));? ? ? ? } catch (DataIntegrityViolationException e) {? ? ? ? ? ? toast(redirectAttributes, message(Consts.Messages.DELETE_TAG_FAILD));? ? ? ? }? ? ? ? return "redirect:/tags/index";? ? }
toast(redirectAttributes, message(Consts.Messages.DELETE_SUCCESSFULLY));求解釋
qq_wthokclv
2016-03-25 10:51:49