-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First seminar/#1 #2
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다~!
@Getter | ||
public class AssignmentResponse { | ||
|
||
private int code; | ||
private String status; | ||
private boolean success; | ||
|
||
@Builder | ||
public AssignmentResponse(int code, String status, boolean success) { | ||
this.code = code; | ||
this.status = status; | ||
this.success = success; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
깔끔하네요~!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다~!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니당..! 시험기간일텐데도 심화과제까지 도전하는 모습 너무 좋아요 👍 !!
앞으로도 같이 질문하면서 성장해봅시당~
this.status = status; | ||
this.success = success; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 builder 패턴을 사용하셨네용!
@AllArgsConstructor
@Getter
@Builder
public class AssignmentResponse {
private int code;
private String status;
private boolean success;
}
요런 코드를 혹시 고려해보셨는지 만약 그랬다면 직접 생성자를 구현하고 Builder 어노테이션을 붙인 이유가 있을까용?!(아 물론 저도 몰라서 ㅎㅎ)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
클래스에 @builder를 적어주는 것은 클래스 내에 모든 필드에 대해 빌더 패턴이 적용되는 거라 생성자 위에 붙이는 것을 고려해보라는 리뷰를 다른 분 코드에서 봤습니다!
그래서 저도 당장 빌더를 적용시킬 생성자 위에만 붙이는게 더 좋을 것 같다는 생각이 들어 이렇게 코드를 적었습니다~!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
의미있는 코드..! 훌륭합니다!🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@builder ,,! 몰랐던 부분인데, 저도 배워갑니다!!😊
@@ -42,4 +42,9 @@ public ResponseEntity<Map<String, String>> healthCheckV4() { | |||
public ResponseEntity<HealthCheckResponse> healthCheckV5() { | |||
return ResponseEntity.ok(new HealthCheckResponse()); | |||
} | |||
|
|||
@GetMapping("/v6") | |||
public AssignmentResponse healthCheckV6() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AssignmentResponse
라고 response
이름을 만들면 나중에 다른 api에 이 api를 변형해서 사용할 때 의미가 뭔가 확 와닿지 않을 것 같다는 느낌이 좀 있긴하네욤ㅎㅎ 메소드 이름이나 변수명등을 고민해보는 것도 좋은 습관이 될 것 같습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이름을 뭐로 할까 되게 고민했는데 일단 리뷰해주실 분들이 빠르게 확인할 수 있도록 한 번에 알아볼 수 있는 이름이 좋지 않을까 하고 이렇게 적었습니다 ㅋㅋ 메소드, 변수 이름을 잘 적는 것이 개인적으로 좀 어려워서 ㅠㅠ 앞으로 더 고민해보도록 하겠습니다! 감사합니다~!!
저도 제네릭부분이 어렵더라구요..!! 다음에 코드작성해보고 같이이야기 나눠보아요!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
응답 객체를 깔끔하게 잘 짜셨네요 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다~!!
this.status = status; | ||
this.success = success; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@builder ,,! 몰랐던 부분인데, 저도 배워갑니다!!😊
✨ Related Issue
📝 과제 구현 명세
https://private-sycamore-e7f.notion.site/1-5cb944599e564234939667584a194116?pvs=4
🐥 이런 점이 새로웠어요 / 어려웠어요