Skip to content

Commit 4b31cf5

Browse files
committed
feat: QueryDsl Config 추가
1 parent 075b976 commit 4b31cf5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.somemore.global.configure;
2+
3+
import com.querydsl.jpa.JPQLTemplates;
4+
import com.querydsl.jpa.impl.JPAQueryFactory;
5+
import jakarta.persistence.EntityManager;
6+
import jakarta.persistence.PersistenceContext;
7+
import org.springframework.context.annotation.Bean;
8+
import org.springframework.context.annotation.Configuration;
9+
10+
@Configuration
11+
public class QueryDslConfig {
12+
13+
@PersistenceContext
14+
private EntityManager em;
15+
16+
@Bean
17+
public JPAQueryFactory jpaQueryFactory() {
18+
return new JPAQueryFactory(em);
19+
}
20+
21+
}

0 commit comments

Comments
 (0)