36 lines
673 B
Java
36 lines
673 B
Java
/**
|
|
*
|
|
*/
|
|
package de.bstly.board;
|
|
|
|
import jakarta.persistence.EntityManager;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
|
|
|
import com.querydsl.jpa.impl.JPAQueryFactory;
|
|
|
|
/**
|
|
* The Class JPAConfig.
|
|
*/
|
|
@Configuration
|
|
@EnableJpaAuditing()
|
|
public class JPAConfig {
|
|
|
|
@Autowired
|
|
private EntityManager em;
|
|
|
|
/**
|
|
* Jpa query factory.
|
|
*
|
|
* @return the JPA query factory
|
|
*/
|
|
@Bean
|
|
public JPAQueryFactory jpaQueryFactory() {
|
|
return new JPAQueryFactory(em);
|
|
}
|
|
|
|
}
|