-
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
feat : 레이싱게임 정보 엔티티,서비스로직,api 개발, 테스트코드 작성 + 레디스 도입 (CC-118) #17
Conversation
(CC-118)
(CC-118)
(CC-118)
(CC-118)
(CC-118)
(CC-118)
(CC-118)
어쩌다보니 커밋이 400줄..ㅎ 테스트코드가 한 100줄쯤 되고 PR단위를 줄여보도록 하겠음~ |
(CC-118)
|
||
@Slf4j | ||
@Service | ||
@RequiredArgsConstructor(access = AccessLevel.PROTECTED) |
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.
@requiredargsconstructor 어노테이션은 클래스에 선언된 final 변수들, 필드들을 매개변수로 하는 생성자를 자동으로 생성해주는 어노테이션이고, AccessLevel.PROTECTED를 무슨 이유로 썻는지 알 수 있을까요?
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를 사용할 때 기본 생성자를 생성하되, 무분별한 생성자를 막기 위해
@NoArgsConstrutor(access = AccessLevel.PROTECTED)
를 사용하는게 맞는 방식인데, 전혀 엉뚱한 곳에 달아버렸네요. 수정하겠습니다.
아래 글도 읽으면 좋을 것 같아요
https://cobbybb.tistory.com/14
https://jaehoney.tistory.com/287
@@ -19,6 +21,11 @@ private SuccessResponse(SuccessCode successCode, T data) { | |||
this.data = data; | |||
} | |||
|
|||
// 성공 관련 정보, 반환 데이터를 파라미터로 받는 생성자 |
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.
수정하겠읍니다
|
||
@Repository | ||
@RequiredArgsConstructor | ||
|
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.
리뷰에 남긴 블로그 한번 읽어보고, dto
와 entity
에서 빌더패턴과 롬복생성자를 사용하는 이유를 같이 공부해봅시다
|
||
@Slf4j | ||
@Service | ||
@RequiredArgsConstructor(access = AccessLevel.PROTECTED) |
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를 사용할 때 기본 생성자를 생성하되, 무분별한 생성자를 막기 위해
@NoArgsConstrutor(access = AccessLevel.PROTECTED)
를 사용하는게 맞는 방식인데, 전혀 엉뚱한 곳에 달아버렸네요. 수정하겠습니다.
아래 글도 읽으면 좋을 것 같아요
https://cobbybb.tistory.com/14
https://jaehoney.tistory.com/287
@@ -19,6 +21,11 @@ private SuccessResponse(SuccessCode successCode, T data) { | |||
this.data = data; | |||
} | |||
|
|||
// 성공 관련 정보, 반환 데이터를 파라미터로 받는 생성자 |
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.
수정하겠읍니다
(CC-118)
(CC-118)
(CC-118)
(CC-118)
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.
nice
📝 작업내용
RacingGameInfo
엔티티를 만들고, 레디스의RedisTemplate
으로 적용하였다LocalDateTime
이JSON으로 직렬/역직렬화 되지 않아서 관련 설정을 추가하였음Mockito
를 이용한 단위테스트 작성!💬 침고사항
📖 레퍼런스