잠깐 써본 것 정리하기

 

 

1. build.gradle

어플리케이션 실행 후, src->main-> generated->entity Q객체들 생성 확인

Q객체가 있어야 selectFrom(comment) 에서 comment가 Comment엔티티라고 알려줄 수 있음. 자세힌 나중에 공부

 

 

QuerydslConfig생성 -> JPAQueryFactory @Bean 등록

 

 

RepositoryCustom, RepositoryImpl 생성

 

RespositoryCustom에 사용할 쿼리 선언

 

RepositoryImpl에 RepositoryCustom 구현

Q객체들 인스턴스이름으로 static import

쿼리 작성

 

Repository에 RepositoryCustom 상속

 

받아줄 DTO에 @QueryProjection(생성자 타입때문에)

'공부 > 잡다' 카테고리의 다른 글

Springboot 저장소  (0) 2023.04.16
IntelliJ 콘솔창 한글 깨질때  (0) 2023.04.15
웹 동작 간략개괄  (0) 2023.04.14
IntelliJ 디버거 활용 - Exception 조건설정  (0) 2023.04.10
Twitter recommendation system code revealed  (0) 2023.04.06

+ Recent posts