Class HibernateJpaConfiguration
java.lang.Object
com.foreach.across.modules.hibernate.jpa.config.HibernateJpaConfiguration
@Configuration
@Import({JpaModuleSettingsRegistrar.class,InterceptorRegistryConfiguration.class,HibernatePackageBuilder.class,org.springframework.boot.autoconfigure.dao.PersistenceExceptionTranslationAutoConfiguration.class,DozerConfiguration.class})
public class HibernateJpaConfiguration
extends Object
Configures a JPA EntityManagerFactory.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
-
Constructor Summary
ConstructorDescriptionHibernateJpaConfiguration
(AcrossHibernateJpaModule module, AcrossHibernateJpaModuleSettings settings, HibernatePackage hibernatePackage, org.springframework.beans.factory.ListableBeanFactory beanFactory) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean
void
registerClientModuleRepositoryInterceptors
(com.foreach.across.core.events.AcrossModuleBeforeBootstrapEvent beforeBootstrapEvent) unitOfWork
(jakarta.persistence.EntityManagerFactory entityManagerFactory)
-
Field Details
-
TRANSACTION_MANAGER
- See Also:
-
TRANSACTION_TEMPLATE
- See Also:
-
DEFAULT_ACROSS_BOOTSTRAP_MODE
public static final org.springframework.data.repository.config.BootstrapMode DEFAULT_ACROSS_BOOTSTRAP_MODE
-
-
Constructor Details
-
HibernateJpaConfiguration
@Autowired public HibernateJpaConfiguration(AcrossHibernateJpaModule module, AcrossHibernateJpaModuleSettings settings, HibernatePackage hibernatePackage, org.springframework.beans.factory.ListableBeanFactory beanFactory)
-
-
Method Details
-
entityManagerFactory
@Bean(name="entityManagerFactory") @Exposed public org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory() -
hibernateSessionHolder
-
unitOfWork
@Bean @Exposed @ConditionalOnExpression("@moduleSettings.createUnitOfWorkFactory") public UnitOfWorkFactory unitOfWork(jakarta.persistence.EntityManagerFactory entityManagerFactory) -
registerClientModuleRepositoryInterceptors
@EventListener public void registerClientModuleRepositoryInterceptors(com.foreach.across.core.events.AcrossModuleBeforeBootstrapEvent beforeBootstrapEvent)
-