We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 075b976 commit 4b31cf5Copy full SHA for 4b31cf5
src/main/java/com/somemore/global/configure/QueryDslConfig.java
@@ -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