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

Method remove

ch4/BoardController3.java:81–96  ·  view source on GitHub ↗
(Integer bno, SearchCondition sc, RedirectAttributes rattr, HttpSession session)

Source from the content-addressed store, hash-verified

79 }
80
81 @PostMapping("/remove")
82 public String remove(Integer bno, SearchCondition sc, RedirectAttributes rattr, HttpSession session) {
83 String writer = (String)session.getAttribute("id");
84 String msg = "DEL_OK";
85
86 try {
87 if(boardService.remove(bno, writer)!=1)
88 throw new Exception("Delete failed.");
89 } catch (Exception e) {
90 e.printStackTrace();
91 msg = "DEL_ERR";
92 }
93
94 rattr.addFlashAttribute("msg", msg);
95 return "redirect:/board/list"+sc.getQueryString();
96 }
97
98 @GetMapping("/list")
99 public String list(Model m, SearchCondition sc, HttpServletRequest request) {

Callers

nothing calls this directly

Calls 2

removeMethod · 0.65
getQueryStringMethod · 0.45

Tested by

no test coverage detected