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

[refactor] 게시물 service 코드 정리 #30

Merged
merged 2 commits into from
Jan 7, 2024
Merged

Conversation

RyuKwanKon
Copy link
Contributor

@RyuKwanKon RyuKwanKon commented Jan 7, 2024

Related Issue 🪢

Summary 🌿

  • querydsl을 추상화하여 repository와 service의 의존성을 최소화했습니다.
  • repository를 추상화하여 impl을 구현하지 않는 것이 요즘 트렌드라고 하지만, jpa repository와 querydsl을 같이 사용하기 때문에 추상화를 통해 의존성을 최소화하는 것이 더 좋은 방법이라고 생각되었습니다.
  • 게시물을 조회하는 2가지 종류의 api를 하나로 합쳤습니다.
  • keyword를 request parameter로 변경하여 null을 허용하는 방식을 선택했습니다.
  • 개발자가 null을 지정하고 입력하는 것은 별로 좋지 못한 코드이기 때문에, 중복된 코드를 최소화하고, null을 주입하지 않도록 개선하였습니다.

Before i request PR review 🧤

  • 코드리뷰로 확인 부탁하는 사항

@RyuKwanKon RyuKwanKon added the REFACTOR 로직 변경없이 코드를 개선하는 리팩토링 label Jan 7, 2024
@RyuKwanKon RyuKwanKon self-assigned this Jan 7, 2024
Copy link
Contributor

@OJOJIN OJOJIN left a comment

Choose a reason for hiding this comment

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

수고하셨습니👍 API 하나로 합치니 더 좋은 것 같아요

Copy link
Member

@ziiyouth ziiyouth left a comment

Choose a reason for hiding this comment

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

확실히 깔끔하네여!! null 주입 막은 거 좋군요 고생하셨습니당~👍

@RyuKwanKon RyuKwanKon merged commit 604edb9 into develop Jan 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REFACTOR 로직 변경없이 코드를 개선하는 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[refactor] 게시물 service 코드 정리
3 participants