This initial version of the example projects demonstrates the usage and mapping behavior of Java 8 Streams in repositories. The test cases oppose a plain List based query method with one that uses a Stream and shows how the former pulls all data into memory first and the iteration is done over the pre-populated list. The execution of the Stream based method in contrast shows that the individual elements are read and converted while iterating the stream.
33 lines
1017 B
XML
33 lines
1017 B
XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.data.examples</groupId>
|
|
<artifactId>spring-data-mongodb-examples</artifactId>
|
|
<version>1.0.0.BUILD-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>spring-data-mongodb-java8</artifactId>
|
|
<name>Spring Data MongoDB - Java 8 specific features</name>
|
|
|
|
<properties>
|
|
<spring-data-releasetrain.version>Fowler-BUILD-SNAPSHOT</spring-data-releasetrain.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>${project.groupId}</groupId>
|
|
<artifactId>spring-data-mongodb-utils</artifactId>
|
|
<version>${project.version}</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.data</groupId>
|
|
<artifactId>spring-data-mongodb</artifactId>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
</project> |