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

feat: 스페이스 단건조회 / LS-13 리뷰 사항 적용 #25

Merged
merged 6 commits into from
Jul 13, 2024

Conversation

raymondanythings
Copy link
Collaborator

📝 PR 타입

  • 기능 추가
  • 기능 수정
  • 기능 삭제
  • 리팩토링
  • docs 작업, swagger 작업
  • 의존성, 환경 변수, 빌드 관련 코드 업데이트

📢 변경 사항

  • QueryDSL 적용
  • Swagger Bearer Auth 적용

❗️To Reviewer

⚙️ 테스트 결과

👉 반영 브랜치

  • feat/#LS-19
  • closed #

- QueryDSL 적용
- Swagger Bearer Auth 적용
@raymondanythings raymondanythings added 🛠️ enhancement 리팩토링 및 개선 🚀 feature 새로운 기능 개발 labels Jul 13, 2024
@raymondanythings raymondanythings self-assigned this Jul 13, 2024
Copy link
Collaborator

@clean2001 clean2001 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

Copy link
Collaborator

@mikekks mikekks 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 26 to 27
.scheme("bearer")
.bearerFormat("JWT")
Copy link
Collaborator

Choose a reason for hiding this comment

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

요기 Bearer 로 안해도 괜찮을까요?!

Comment on lines +30 to 35
var spacePages = spaceRepository.findAllSpacesByMemberIdAndCategoryAndCursor(memberId, getSpaceRequest.cursorId(), getSpaceRequest.category(), getSpaceRequest.pageSize());

boolean hasNextPage = spacePages.size() > getSpaceRequest.pageSize();
if (hasNextPage) {
spacePages.remove(spacePages.size() - 1);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

여기 Page 객체 사용하면 코드가 더 깔끔해질 것 같은데 어떻게 생각하시나요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

페이지객체 사용시 토탈카운트가 필요한것 같아 제거했는데요! 참고할만한 변경 예시 공유부탁드려요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

아아 그러네요! 제가 잘못생각한 것 같습니다!

다만 저희가 앞으로 커서기반으로 구현할 것 같아서 이거 관련해서 하나의 인터페이스가 있으면 좋을 것 같은데요! 아래와 같이 만들어보는 건 어떨까요?? 하나 만들면 앞으로 용이하게 쓸 것 같아서 제안드려봅니다...!

https://velog.io/@orijoon98/Spring-%EB%AC%B4%ED%95%9C%EC%8A%A4%ED%81%AC%EB%A1%A4-%EA%B5%AC%ED%98%84-1-%EC%BB%A4%EC%84%9C-%EA%B8%B0%EB%B0%98-%ED%8E%98%EC%9D%B4%EC%A7%80%EB%84%A4%EC%9D%B4%EC%85%98

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

저도 너무 이렇게 하고싶었지만
스프링에 익숙하지 않아 비용이 많이 들 것으로 판단되어 임시로 구현해둔거였어요😭
최소기능 작업 완료 이후 추가하면 좋을 것 같아요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

넵 좋습니다!

Comment on lines +12 to +18
public class AtLeastNotNullValidator implements ConstraintValidator<AtLeastNotNull, Object> {
private int min;

@Override
public void initialize(AtLeastNotNull constraintAnnotation) {
this.min = constraintAnnotation.min();
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

이 어노테이션 의도만 말씀해주실 수 있을까요?!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정요청시 특정 부분만 수정할 수 있게 구현되었는데요! 전체 DTO필드 중 empty를 제거하게 되는데, 모든 필드가 null일 경우 또는 최소 n가지 필드를 요구할 경우 사용됩니다

Comment on lines -10 to +14
@Builder
@SuperBuilder
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 superBuild 쓰신 의도 여쭤봐도 괜찮을까요?1

Copy link
Collaborator Author

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를 사용했어요!

- HTTP Security 스키마명 변경
- userCount 오류 수정
@raymondanythings raymondanythings merged commit edd871a into develop Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ enhancement 리팩토링 및 개선 🚀 feature 새로운 기능 개발
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants