Skip to content

Latest commit

 

History

History
20 lines (10 loc) · 1.25 KB

README.MD

File metadata and controls

20 lines (10 loc) · 1.25 KB

Java Stream API Exercises

Introduction

This GitHub project was created to serve as a playground for practicing Java Stream API. There are 15 exercises which introduce the API usage including filtering, transformation, sorting and the output to various formats.

It is a Spring Boot project with a example data model, repositories and a set of pre-defined data. The system automatically loads data into H2 in-memory database when the Spring Boot app starts up. Therefore, you can fetch data from database by calling repositories and experiment the usage of Java Stream API.

IDE Setup

This project depends on Lombok Library which is an awesome code auto generation tool, it greatly simplify the source code. Read this article if you would like to know more about the usage.

To configure your IDE for the support of Lombok, check out the official documentation for detail.

Data Model

The example data model consists of Customer, Order and Product. Customers can place multiple orders and each order would contain a number of products.

Data Model