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.
47 lines
1.3 KiB
XML
47 lines
1.3 KiB
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>
|
|
|
|
<artifactId>spring-data-mongodb-examples</artifactId>
|
|
<packaging>pom</packaging>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.data.examples</groupId>
|
|
<artifactId>spring-data-examples</artifactId>
|
|
<version>1.0.0.BUILD-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<name>Spring Data MongoDB - Examples</name>
|
|
<description>Sample projects for Spring Data MongoDB</description>
|
|
<url>http://projects.spring.io/spring-data-mongodb</url>
|
|
<inceptionYear>2011-2015</inceptionYear>
|
|
|
|
<modules>
|
|
<module>aggregation</module>
|
|
<module>example</module>
|
|
<module>text-search</module>
|
|
<module>java8</module>
|
|
<module>util</module>
|
|
</modules>
|
|
|
|
<dependencies>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.data</groupId>
|
|
<artifactId>spring-data-mongodb</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.mysema.querydsl</groupId>
|
|
<artifactId>querydsl-mongodb</artifactId>
|
|
<version>${querydsl.version}</version>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter</artifactId>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
|
|
</project> |