use of org.neo4j.ogm.session.event.EventListener in project spring-boot by spring-projects.
the class Neo4jDataAutoConfiguration method sessionFactory.
@Bean
public SessionFactory sessionFactory(org.neo4j.ogm.config.Configuration configuration, ApplicationContext applicationContext, ObjectProvider<List<EventListener>> eventListeners) {
SessionFactory sessionFactory = new SessionFactory(configuration, getPackagesToScan(applicationContext));
List<EventListener> providedEventListeners = eventListeners.getIfAvailable();
if (providedEventListeners != null) {
for (EventListener eventListener : providedEventListeners) {
sessionFactory.register(eventListener);
}
}
return sessionFactory;
}
Aggregations