RecruitUs / Wanted-Server

Wanted Backend 레포지토리
0 stars 0 forks source link

BaseResponse 생성 #3

Closed LEEJaeHyeok97 closed 1 year ago

LEEJaeHyeok97 commented 1 year ago

api 생성하고 각 api에 맞춰서 SuccessCode, ErrorCode 더 추가하면 됨.

Controller에서 이런식으로 쓰면 됨.

@GetMapping
public BaseResponse<Dto> getAllUser(
    Dto data = userService.getAllUser(...);
    return BaseResponse.success(CUSTOM_RESPONSE_SUCCESS, data);
}