コード例 #1
0
  @RequestMapping("edit")
  public ModelAndView edit(
      @RequestParam("tit") String tit,
      @RequestParam("cont") String cont,
      @RequestParam("desc") String desc,
      @RequestParam("articleId") Integer articleId) {
    ModelAndView mv = new ModelAndView("my_view_articles");

    Article article = service.getArticle(articleId);
    article.setContent(cont);
    article.setTitle(tit);
    article.setDescription(desc);
    service.updateArticle(article);
    return mv;
  }