Spring-Data
Access your data easily
Part 1 - Spring Data Repositories
Created by Marcel Becker
- Software Developer @ 1&1 Internet AG
- http://tuxdevelop.github.io
- MailTo: tuxdevelop@gmail.com
- github: https://github.com/tuxdevelop
Table of Content
- Overview
- Part 0 - Infrastructure
- Part 1 - Repository Introduction
- Part 2 - CRUD Repository
- Part 3 - Paging & Sorting
- Part 4 - Own Base Repositories
- Part 5 - Dynamic Queries
- Part 6 - Custom Repository Implementations
- Part 7 - Spring Data Rest
- Part 7.1 - HAL_JSON Traverson
Summary
- Set up Maven
- Basic JPA Infrastructure
- Populate test data
Part 1 - Repository
Introduction
Goals
- Find Customer by Id
- Find Customer by first name
Summary
- Introduce Repository Interface
- Introduce Base Repository Implementation
- Introduce Query Builder
Goals
- Using CRUD Methods
- Overriding existing Methods
Summary
- Introduce CRUD Interface
- UpCast of return values
Part 3 - Paging & Sorting
Goals
- Use Paging & Sorting
- Overriding Method Behavior with Annotations
- Get Customers of a city
Summary
- Introduce Paging and Sorting
- Use @Transactional to define Timeout
- Customized Queries
Part 4 - Define Base
Repositories
Summary
- Defined own ReadOnlyRepository
- @NoRepositoryBean
Goals
- find a Customer by
- firstName
- lastName
- or both
Summary
- Introduced QueryDSL
- Easily Set Up Dynamic Queries on Client Side
Part 6 - Custom Repository Implementations
Goals
- Implementations of Delete Methods for Orders beyond a given price
Summary
- Defined Custom Repository Impl
- Combined Impl with Repository Interface
Part 7 - Spring Data Rest
Goals
- Expose Repositories as RESTful Service
Summary
- @RepositoryRestController
Part 7.1 - HAL_JSON Traversion
Summary
- Accessing Service via RestTemplate
- Traverse through HAL_JSON Tree via Traversion
- @Projection
- Spring-Data-MongoDB
- Spring-Data-Solr
- Spring-Data-Repositories in CDI Environments
Resources
- tuxdevelop.github.io
- https://github.com/tuxdevelop