Skip to content

Commit

Permalink
✨ Practice(#6) : QueryDSL 설정파일 만들기
Browse files Browse the repository at this point in the history
  • Loading branch information
Ssamssamukja committed Nov 7, 2024
1 parent 7cb24db commit 16cbf1f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spring/src/main/java/umc/spring/config/QueryDSLConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package umc.spring.config;

import com.querydsl.jpa.impl.JPAQueryFactory;
import jakarta.persistence.EntityManager;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@RequiredArgsConstructor
public class QueryDSLConfig {
private final EntityManager entityManager;

@Bean
public JPAQueryFactory jpaQueryFactory(){
return new JPAQueryFactory(entityManager);
}
}

0 comments on commit 16cbf1f

Please sign in to comment.