Skip to content

Commit

Permalink
feat: QueryDslConfig 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
zinzoddari committed Jan 7, 2024
1 parent b61d0a1 commit 3b2b331
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/main/java/org/idiot/yesslave/global/jpa/QueryDslConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.idiot.yesslave.global.jpa;

import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Configuration
public class QueryDslConfig {
@PersistenceContext
private EntityManager entityManager;

public QueryDslConfig() {
}

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

0 comments on commit 3b2b331

Please sign in to comment.