Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

First seminar/#1 #2

wants to merge 4 commits into from

Conversation

Chan531
Copy link
Contributor

@Chan531 Chan531 commented Oct 19, 2023

✨ Related Issue


📝 과제 구현 명세

  1. 기본과제
  1. 심화과제
  • v6에서는 그냥 심화과제를 해결하고자 했습니다.
  • v7에서는 builder를 활용해서 심화과제를 해결하고자 했습니다.
  1. 키워드과제

🐥 이런 점이 새로웠어요 / 어려웠어요

  • 키워드 과제를 하던 중 제네릭에 대한 부분이 살짝 어려워서 따로 실습을 진행해봐야할 거 같습니다.
  • 싱글톤 공부 전에 스프링 빈과 Application Context에 대해 사전 공부를 좀 해야했어서 이해하는데 어려웠습니다. ㅠㅠ 계속해서 관련 자료들을 찾아보면서 머릿속에 익혀야할 거 같습니다.

Copy link
Member

@unanchoi unanchoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~!

Comment on lines +6 to +19
@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;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

깔끔하네요~!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다~!!

Copy link

@sss4920 sss4920 left a 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;
}
}
Copy link

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 어노테이션을 붙인 이유가 있을까용?!(아 물론 저도 몰라서 ㅎㅎ)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

클래스에 @builder를 적어주는 것은 클래스 내에 모든 필드에 대해 빌더 패턴이 적용되는 거라 생성자 위에 붙이는 것을 고려해보라는 리뷰를 다른 분 코드에서 봤습니다!

그래서 저도 당장 빌더를 적용시킬 생성자 위에만 붙이는게 더 좋을 것 같다는 생각이 들어 이렇게 코드를 적었습니다~!!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

의미있는 코드..! 훌륭합니다!🔥

Copy link
Member

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() {
Copy link

@sss4920 sss4920 Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssignmentResponse라고 response 이름을 만들면 나중에 다른 api에 이 api를 변형해서 사용할 때 의미가 뭔가 확 와닿지 않을 것 같다는 느낌이 좀 있긴하네욤ㅎㅎ 메소드 이름이나 변수명등을 고민해보는 것도 좋은 습관이 될 것 같습니다!☺️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이름을 뭐로 할까 되게 고민했는데 일단 리뷰해주실 분들이 빠르게 확인할 수 있도록 한 번에 알아볼 수 있는 이름이 좋지 않을까 하고 이렇게 적었습니다 ㅋㅋ 메소드, 변수 이름을 잘 적는 것이 개인적으로 좀 어려워서 ㅠㅠ 앞으로 더 고민해보도록 하겠습니다! 감사합니다~!!

@bo-ram-bo-ram
Copy link
Member

저도 제네릭부분이 어렵더라구요..!! 다음에 코드작성해보고 같이이야기 나눠보아요!!
찬님 본받아서 심화과제 도전해보겠습니다!!
고생하셨습니다~!~!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

응답 객체를 깔끔하게 잘 짜셨네요 👍

Copy link
Contributor Author

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;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@builder ,,! 몰랐던 부분인데, 저도 배워갑니다!!😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 1차 세미나 과제
5 participants