派生自 projectDept/qhighschool

EricsHu
2023-11-26 1da190e7f267bcd3501884f3aeaac7476850fec7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.qxueyou.scc.base.service.impl;
 
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
 
import org.springframework.data.repository.NoRepositoryBean;
 
import com.querydsl.jpa.impl.JPAQueryFactory;
 
 
/**
 * 基础jpa 获取em
 * @author zhiyong
 *
 */
@NoRepositoryBean
public class BaseRepository {
 
    @PersistenceContext
    public EntityManager em;
    
    public JPAQueryFactory queryFactory;
 
    public JPAQueryFactory getQueryFactory() {
        return new JPAQueryFactory(em);
    }
    
    
    
    
}