MCPcopy Index your code
hub / github.com/castello/spring_basic / remove

Method remove

ch4/BoardController2.java:90–107  ·  view source on GitHub ↗
(Integer bno, Integer page, Integer pageSize, RedirectAttributes rattr, HttpSession session)

Source from the content-addressed store, hash-verified

88 }
89
90 @PostMapping("/remove")
91 public String remove(Integer bno, Integer page, Integer pageSize, RedirectAttributes rattr, HttpSession session) {
92 String writer = (String)session.getAttribute("id");
93 String msg = "DEL_OK";
94
95 try {
96 if(boardService.remove(bno, writer)!=1)
97 throw new Exception("Delete failed.");
98 } catch (Exception e) {
99 e.printStackTrace();
100 msg = "DEL_ERR";
101 }
102
103 rattr.addAttribute("page", page);
104 rattr.addAttribute("pageSize", pageSize);
105 rattr.addFlashAttribute("msg", msg);
106 return "redirect:/board/list";
107 }
108
109 @GetMapping("/list")
110 public String list(@RequestParam(defaultValue ="1") Integer page,

Callers

nothing calls this directly

Calls 1

removeMethod · 0.65

Tested by

no test coverage detected