Example usage for org.springframework.beans.factory ObjectProvider stream

List of usage examples for org.springframework.beans.factory ObjectProvider stream

Introduction

In this page you can find the example usage for org.springframework.beans.factory ObjectProvider stream.

Prototype

default Stream<T> stream() 

Source Link

Document

Return a sequential Stream over all matching object instances, without specific ordering guarantees (but typically in registration order).

Usage

From source file:org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration.java

@Bean
public SessionFactory sessionFactory(org.neo4j.ogm.config.Configuration configuration,
        ApplicationContext applicationContext, ObjectProvider<EventListener> eventListeners) {
    SessionFactory sessionFactory = new SessionFactory(configuration, getPackagesToScan(applicationContext));
    eventListeners.stream().forEach(sessionFactory::register);
    return sessionFactory;
}