RequestParam
@GetMapping("/post/view.do")
public String openPostView(@RequestParam final Long id, Model model) {
PostResponse post = postService.findPostById(id);
model.addAttribute("post", post);
return "post/view";
}
@GetMapping("/post/delete.do")
public String deletePost(@RequestParam final Long id){
postService.deletePost(id);
return "redirect:/post/list.do";
}
RequestParam 어노테이션은 파라미터를 이름으로 바인딩해준다
추가 예정