diff --git a/spring-boot-service-template-database/spring-boot-service-template-database-jpa/src/main/java/com/lanyuanxiaoyao/service/template/database/jpa/configuration/QueryDSLConfiguration.java b/spring-boot-service-template-database/spring-boot-service-template-database-jpa/src/main/java/com/lanyuanxiaoyao/service/template/database/jpa/configuration/QueryDSLConfiguration.java new file mode 100644 index 0000000..c094527 --- /dev/null +++ b/spring-boot-service-template-database/spring-boot-service-template-database-jpa/src/main/java/com/lanyuanxiaoyao/service/template/database/jpa/configuration/QueryDSLConfiguration.java @@ -0,0 +1,14 @@ +package com.lanyuanxiaoyao.service.template.database.jpa.configuration; + +import com.querydsl.jpa.impl.JPAQueryFactory; +import jakarta.persistence.EntityManager; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class QueryDSLConfiguration { + @Bean + public JPAQueryFactory jpaQueryFactory(EntityManager manager) { + return new JPAQueryFactory(manager); + } +}