toast(redirectAttributes, message(Consts.Messages.DELETE_SUCCESSFULLY));求解释

@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";

    }


qq_wthokclv
浏览 1299回答 0
0回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java