2021-10-03 17:17:00 +02:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package de.bstly.board;
|
|
|
|
|
2023-12-12 21:20:25 +01:00
|
|
|
import jakarta.persistence.EntityManager;
|
2021-10-03 17:17:00 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
/**
|
2021-10-04 13:02:40 +02:00
|
|
|
* The Class JPAConfig.
|
2021-10-03 17:17:00 +02:00
|
|
|
*/
|
|
|
|
@Configuration
|
|
|
|
@EnableJpaAuditing()
|
|
|
|
public class JPAConfig {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private EntityManager em;
|
|
|
|
|
2021-10-04 13:02:40 +02:00
|
|
|
/**
|
|
|
|
* Jpa query factory.
|
|
|
|
*
|
|
|
|
* @return the JPA query factory
|
|
|
|
*/
|
2021-10-03 17:17:00 +02:00
|
|
|
@Bean
|
|
|
|
public JPAQueryFactory jpaQueryFactory() {
|
|
|
|
return new JPAQueryFactory(em);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|