728x90 Data JPA3 QueryDsl, data jpa 하나의 레포지토리 사용 클래스, 인터페이스 구조 최종 사용하는 레포지토리 (MemberDataRepository) import java.util.Optional; @EnableJpaRepositories /** * 실제 사용하는 리포지토리 * 단순한 CRUD 쿼리는 여기서 작성 */ public interface MemberDataRepository extends JpaRepository, MemberCustomRepository { Member findMemberByEmail(String email); } MemberCustomRepository import java.util.List; @Repository //커스텀 인터페이스 쿼리 작성 public interface MemberCustomRepository { Long e.. 2022. 3. 10. Spring Data Jpa repository 통합 @Repsository 어노테이션 안 붙여줘도 빈 등록한다. 2022. 2. 23. 스프링 데이터 jpa Auditing BaseEntity 생성 package com.study.datajpa.entity; import lombok.Getter; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistenc.. 2021. 10. 23. 이전 1 다음 728x90