Skip to content

Commit

Permalink
[#286] feat(QueryDslConfig): QueryDsl관련 Config 클래스 생성
Browse files Browse the repository at this point in the history
  • Loading branch information
hoonyworld committed Dec 6, 2024
1 parent 6e9ac0d commit 11a3351
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/main/java/com/beat/global/common/config/QueryDslConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.beat.global.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.querydsl.jpa.impl.JPAQueryFactory;

import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

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

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

0 comments on commit 11a3351

Please sign in to comment.