- [JPA] 6. DELETE 방식의 이해2024년 09월 27일
- Song hyun
- 작성자
- 2024.09.27.:17
728x90반응형[JPA] 6. DELETE 방식의 이해
1. DELETE 방식의 특징
2. 시나리오 코드
package com.tenco.demo.controller; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController // IoC 대상 (싱글톤 패턴으로 관리) public class DeleteController { // 멀티 스레딩 환경! // http://localhost:8080/delete/100?acount=우리은행 @DeleteMapping("/delete/{userId}") @GetMapping("/delete/{userId}") public ResponseEntity<?> delete(@PathVariable(name = "userId")String userId, @RequestParam(name="account")String account){ System.out.println("userId : "+userId); System.out.println("account : "+account); return ResponseEntity.status(200).body("정상 삭제 되었습니다."); } }
728x90반응형'JPA' 카테고리의 다른 글
[JPA] 8. JPA와 하이버네이트란? (0) 2024.09.30 [JPA] 7. 스프링 부트 DB 접근 기술 ORM (0) 2024.09.30 [JPA] 5. PUT 방식의 이해 (0) 2024.09.27 [JPA] 4. GET 방식과 URL 주소 설계 (1) 2024.09.26 [JPA] 스프링부트에서의 간단한 요청과 응답 동작 방식 (0) 2024.09.26 다음글이전글이전 글이 없습니다.댓글
스킨 업데이트 안내
현재 이용하고 계신 스킨의 버전보다 더 높은 최신 버전이 감지 되었습니다. 최신버전 스킨 파일을 다운로드 받을 수 있는 페이지로 이동하시겠습니까?
("아니오" 를 선택할 시 30일 동안 최신 버전이 감지되어도 모달 창이 표시되지 않습니다.)