-
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: 스페이스 단건조회 / LS-13 리뷰 사항 적용 #25
Conversation
- QueryDSL 적용 - Swagger Bearer Auth 적용
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.
수고하셨습니다!
layer-domain/src/main/java/org/layer/domain/space/repository/SpaceCustomRepository.java
Outdated
Show resolved
Hide resolved
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.
고생하셨습니다!! 정말 속도가 미쳤네요...! 궁금한 부분 질문 남겼습니다 !!
.scheme("bearer") | ||
.bearerFormat("JWT") |
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.
요기 Bearer 로 안해도 괜찮을까요?!
var spacePages = spaceRepository.findAllSpacesByMemberIdAndCategoryAndCursor(memberId, getSpaceRequest.cursorId(), getSpaceRequest.category(), getSpaceRequest.pageSize()); | ||
|
||
boolean hasNextPage = spacePages.size() > getSpaceRequest.pageSize(); | ||
if (hasNextPage) { | ||
spacePages.remove(spacePages.size() - 1); | ||
} |
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.
여기 Page 객체 사용하면 코드가 더 깔끔해질 것 같은데 어떻게 생각하시나요!
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.
저도 너무 이렇게 하고싶었지만
스프링에 익숙하지 않아 비용이 많이 들 것으로 판단되어 임시로 구현해둔거였어요😭
최소기능 작업 완료 이후 추가하면 좋을 것 같아요!
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.
넵 좋습니다!
public class AtLeastNotNullValidator implements ConstraintValidator<AtLeastNotNull, Object> { | ||
private int min; | ||
|
||
@Override | ||
public void initialize(AtLeastNotNull constraintAnnotation) { | ||
this.min = constraintAnnotation.min(); | ||
} |
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필드 중 empty를 제거하게 되는데, 모든 필드가 null일 경우 또는 최소 n가지 필드를 요구할 경우 사용됩니다
layer-domain/src/main/java/org/layer/domain/space/dto/SpaceWithMemberCount.java
Show resolved
Hide resolved
@Builder | ||
@SuperBuilder |
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.
이거 superBuild 쓰신 의도 여쭤봐도 괜찮을까요?1
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.
Space 생성 시 영속성 컨텍스트를 통해 MemberSpaceRelation을 저장하는데, 이때 엔티티 생성을 위해 빌더패턴을 사용중입니다
다만 BaseEntity에 식별자를 포함하고 있기 때문에 Builder 사용하기 위해 SuperBuilder를 사용했어요!
layer-api/src/main/java/org/layer/domain/space/service/SpaceService.java
Outdated
Show resolved
Hide resolved
- HTTP Security 스키마명 변경 - userCount 오류 수정
📝 PR 타입
📢 변경 사항
❗️To Reviewer
⚙️ 테스트 결과
👉 반영 브랜치