Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- jpa
- springboot
- CRUD
- 물
- 오버라이딩
- sprinboot
- t삭제(delete)
- /자바 #/간단한프로그램
- Update
- 문자와숫자#특수기호
- 자바
- 쿠팡
- 자바#게임
- 탐사수
- 자바#제네릭스기본#List개념
- 절차지향
- 조건문#중첩반복문#기본
Archives
- Today
- Total
목록Spring/SpringBoot CRUD 게시판 (Delete) (1)
간단

● header 맨아래쪽에 addFlashAttribue 메소드를 위해 코드 추가 {{#msg}} {{msg}} {{/msg}} ● Controller //삭제 @GetMapping("/list/{id}/delete") public String delete(@PathVariable Long id, RedirectAttributes rttr){ //삭제할 대상 가져오기 Member target = memberRepository.findById(id).orElse(null); if(target != null){ memberRepository.delete(target); rttr.addFlashAttribute("msg","삭제가 완료되었습니다"); } return "redirect:/index" ; } ● ..
Spring/SpringBoot CRUD 게시판 (Delete)
2023. 8. 17. 22:06