Spring Data

Spring Data

1h 42mIntermediate2023-01-23

Authors

Mary Ellen Bowman

Mary Ellen Bowman

25+ years of full life-cycle software development experience

Course details

Coding to databases—which often involves the use of boilerplate code that's difficult to maintain and debug—can be tedious work. Upgrading applications to a different kind of data storage is similarly challenging, as it usually involves massive code rewrites. Spring Data addresses these issues by abstracting data store interactions into a common repository API and eliminating boilerplate code.

In this course, learn how to easily implement JPA-based repositories using Spring Data JPA. Instructor Mary Ellen Bowman introduces you to the Spring Data umbrella project and covers a handful of commonly used querying methods that you can start practicing on your own. From simple query methods with property expressions to more dynamic options like Querydsl, Query by Example (QBE), Spring Data REST, and MongoDB, Mary Ellen helps you build the skills you need to leverage the features of this powerful data management tool.

Skills covered

SpringWeb Development ToolsWeb DevelopmentOpen SourceDeep Dive (X:Y)

Concepts

Introduction

  • Diving into Spring Data
  • What you need

Spring Data Umbrella Project

  • Mission and modules
  • Java Persistence API

Introduction to Spring Data JPA

  • Spring Boot Starter Data JPA
  • Spring Data CrudRepository and JPA repository
  • Challenge - Fix SimpleDBCrudTest syntax errors
  • Solution - Fix SimpleDBCrudTest syntax errors
  • Spring Data JPA magic

Spring Data JPA Query Methods

  • Property expression query methods
  • Query method clauses with property expressions
  • @Query annotation
  • Challenge - Refactor to three query methods
  • Solution - Refactor to three query methods
  • Paging and sorting

Dynamic Spring Data JPA Queries

  • Specifications
  • Querydsl
  • Query by Example
  • Challenge - Query by Example
  • Solution - Query by Example

More Spring Data Features

  • Spring Data REST
  • Spring Data MongoDB
  • Non-blocking Spring Data reactive repositories
  • More data source support and features

Conclusion

  • Next steps with Spring Data
40,000 Toman