Пример #1
0
 @RequestMapping(value = "/editArticle")
 public String editArticle(Model model, Article article) {
   if (article != null && !StringUtils.isEmpty(article.getId())) {
     article = articleService.getArticleById(article.getId());
     model.addAttribute("article", article);
   }
   return "/page/article/editArticle";
 }
Пример #2
0
 @RequestMapping(value = "/delete")
 public String deleteArticle(Model model, Article article) {
   articleService.deleteArticle(article.getId());
   List<Article> list = articleService.getAtriclesByMybatis();
   model.addAttribute("list", list);
   return "/page/article/listArticles";
 }