feat(jpa): 增加默认 JpaQueryFactory 的注入
This commit is contained in:
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user