-
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
[feat/#91] 좋아요 기능 API 구현 #95
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.
수고하셨습니다!
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.
좋아요 관련 API에서 return 할 때 ResponseEntity.ok 안에 ResultResponse 형태로 반환해주셔야 해요.
50번줄 코드 참고하시면 될 것 같아요!
성공코드는 global/result/ResultCode에 추가하시면 됩니다.
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.
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)를 적용해 반환 시 카멜케이스를 스네이크 케이스로 변환시키고 있습니다.
like_status -> likeStatus로 카멜케이스 적용해주세요
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.
전 PR에서 희경님이 알려주셨는데 제가 옮기면서 또 까먹었네요..ㅜ
다시 수정하겠습니다 !!
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.
마찬가지로 likeStatus로 변경해주세요
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.
혹시 redis에선 트랜잭션을 어떻게 관리하나요?
테스트 코드 작성할 때 좋아요 기능 실행 중 에러 발생시키는 테스트 만들어서 key가 저장되는지 확인해보면 좋을 것 같네요
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.
redis에서 트래잭션을 관리하는 방법은 크게 2가지가 존재한다고 합니다.
현재 프로젝트에서 사용중인 Lettuce(Redis Client)가 PlatformTransactionManager 구현체를 제공하지 않아서 JPA의 JpaTransactionManager를 사용해야 할것 같습니다. 적용 완료했습니다!
생각도 못하고 있었는데 알려주셔서 이번기회로 공부하게 되었습니다!! 아래 링크도 참고 바랍니다!
테스트 코드 작성할때 만들어보겠습니다.
https://wildeveloperetrain.tistory.com/137
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.
여기도 카멜케이스 적용해주세요
📢 기능 설명
redis를 사용하여 좋아요 기능 구현
연결된 issue
close #91
✅ 체크리스트