Spring강의1 [TIL] 231214 ResponseEntity @PostMapping("/signup") public ResponseEntity signup(@Valid @RequestBody UserRequestDto userRequestDto){ userService.signup(userRequestDto); return ResponseEntity.status(201).body(new CommonResponseDto("회원가입 성공",201)); } ResponseEntity 구조 - HttpStatus - HttpHeader : 요청 요구사항 - HttpBody : 내용 상태코드만 반환해줄 때 return ResponseEntity.ok().build(); 2023. 12. 14. 이전 1 다음