@Configuration
@ConditionalOnProperty(value="spring.data.jpa.repositories.bootstrap-mode",
havingValue="deferred")
public static class HibernateJpaConfiguration.DeferredRepositoryInitializer
extends Object
| Constructor and Description |
|---|
DeferredRepositoryInitializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
initializeRepositories(com.foreach.across.core.events.AcrossContextBootstrappedEvent contextBootstrappedEvent)
This method will trigger when the spring.data.jpa.repositories.bootstrap-mode is set to deferred.
|
@EventListener public void initializeRepositories(com.foreach.across.core.events.AcrossContextBootstrappedEvent contextBootstrappedEvent)
RepositoryConfigurationDelegate
but registers the DeferredRepositoryInitializationListener in each Beanfactory
The EventListener below will trigger after AcrossContextBootstrappedEvent
and activate the Repositories by calling them once (on the first AcrossHibernateJpaModule) that matches.Copyright © 2020. All rights reserved.