From 7b555492eebfce693c028d7b52ef9df9c39c31d3 Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Thu, 22 Jan 2026 22:36:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(jpa):=20=E5=A2=9E=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=20JpaQueryFactory=20=E7=9A=84=E6=B3=A8=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jpa/configuration/QueryDSLConfiguration.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spring-boot-service-template-database/spring-boot-service-template-database-jpa/src/main/java/com/lanyuanxiaoyao/service/template/database/jpa/configuration/QueryDSLConfiguration.java 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); + } +}