-
Notifications
You must be signed in to change notification settings - Fork 2
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
♻️ refactor: 설문조사 내부 로직 수정 (#59) #63
Conversation
|
||
|
||
@UtilityClass |
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.
유틸리티 클래스에 대해 인스턴스화(객체 생성)를 방지하기 위해 생성자를 private으로 선언하려고 했습니다.
유틸리티 클래스는 주로 정적 메서드로만 구성되며, 객체 상태를 가지지 않기 때문에 이러한 어노테이션을 찾아봤습니다.
저도 찾아서 써본 건데, 해당 글 참고해보니 오히려 단점도 있는 어노테이션 이네요...
평소 쓰던대로 @NoArgsConstructor(access = AccessLevel.PRIVATE) 로 바꾸겠습니다.
@CollectionTable(name = "setting_days", joinColumns = @JoinColumn(name = "setting_id")) | ||
@Column(name = "day") | ||
@Enumerated(EnumType.STRING) | ||
private Set<DayOfWeek> days = new HashSet<>(); |
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.
굿
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Slf4j | ||
@RestControllerAdvice | ||
@ControllerAdvice |
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.
@ControllerAdvice + @ReseponseBody = @RestControllerAdvice 인 걸로 알아서 @ControllerAdvice 만 쓰면 예외 제대로 안 던져졌던 거 같은데 ~ 혹시 바꾸신 이유가 있으신가요 ?
참고: https://medium.com/sjk5766/restcontrolleradvice-vs-controlleradvice-%EC%A0%95%EB%A6%AC-1591010ce0b0
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.
죄송합니다.
☝️Issue Number
🔎 Key Changes
1cfd4c1
💌 To Reviewers