[실전! 스프링 부트와 JPA 활용 2 - API 개발과 성능 최적화] API 개발 기본
·
Back-End/JPA
[작성일: 2023. 09. 28] 회원 등록 API@RestController@RequiredArgsConstructorpublic class MemberApiController { private final MemberService memberService; @PostMapping("/api/v1/members") public CreateMemberResponse saveMemberV1(@RequestBody @Valid Member member) { Long id = memberService.join(member); return new CreateMemberResponse(id); } @Data @AllArgsConstructor sta..