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

게시물 검색 기능 (동적 쿼리) #7

Open
MinChul-Son opened this issue Aug 4, 2021 · 0 comments
Open

게시물 검색 기능 (동적 쿼리) #7

MinChul-Son opened this issue Aug 4, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@MinChul-Son
Copy link
Owner

가장 핵심 기능이라고 볼 수 있을 것이다.

Querydsl을 사용하여 동적 쿼리를 구현하였다.
image

@Configuration@Bean을 통해 JPAQueryFactory를 스프링 빈으로 등록시켜 사용하였다.

image

  • 제목, 작성자, 내용 중 선택하여 검색할 수 있다.

현재 Spring Data JPA와 함께 사용하므로 BoardRepositoryCustom이라는 인터페이스를 만들고 그 구현체인 BoardRepositoryImplQuerydsl을 사용하여 동적쿼리 기능을 구현하고 BoardRepository에서 JpaRepository와 함께 상속 받아 사용한다.
image

나의 블로그에 자세히 설명을 해놓았으므로 블로그 링크를 첨부한다.
블로그

@MinChul-Son MinChul-Son added the documentation Improvements or additions to documentation label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant