TI273
Information technology

Spring Data: implementing a flexible, scalable data access layer

Use the Repository pattern to simplify, structure and expose your database accesses


In a business application, access to data must be reliable, structured and easy to maintain. This is precisely the role of the Repository pattern, which Spring Data illustrates through a rich set of tools dedicated to both relational databases (JPA) and NoSQL databases (Elasticsearch, MongoDB...). This training course will teach you how to design a clear, reusable persistence layer with Spring Data. You'll discover how to create and extend repositories, formulate simple or complex queries (examples, derivations, @Query, advanced searches), and take advantage of pagination, transactions and REST integration via Spring Data REST. Practical exercises will enable you to connect repositories to a business layer, then expose them as ready-to-consume REST APIs, with fine-grained management of projections, HTTP status and errors. You'll also work on JPA and Elasticsearch to cover different data access needs. You'll learn how to build a modern, testable data access layer that meets the requirements of today's Java applications.

Objectives

Master the implementation of the Repository pattern with Spring Data to design a clear, extensible data access layer that can be integrated into a modern application architecture.

Is it for you ?

Developers and architects.

Prerequisite

This course requires a sound knowledge of the basics of Java programming (principles of object-oriented programming, generic types, annotations, lambda expressions), Spring and Spring boot and experience of working with Eclipse or IntelliJ.

Content

Introduction

  • The different types of database (SQL, NoSQL).
  • Non-blocking execution of I/O operations.
  • The role of a connection pool.
  • Transactions and ACID principles.
  • Object/database mapping.
  • Presentation of the Repository pattern and Spring Data.

Practical application: getting to grips with a Spring application (data access, REST API, testing).

See more + / -

Spring Data repositories

  • Mapping model entities to the database using Spring annotations.
  • Create, read, update and delete operations.
  • Pagination and classification for paginated queries.
  • Example queries for multi-criteria searches.
  • Derived queries for customized searches.
  • @Query annotation for native queries.
  • Application of transactions.
  • The specifics of two Spring Data variants: Spring Data JPA and Spring Data ElasticSearch.

Practical application: creating JPA and ElasticSearch repositories, using them in a backend application.

The Spring Data REST extension

  • Principle.
  • Projections to control resource representation.
  • Searches.
  • Error handling and mapping to HTTP code.
  • Event observers.

Practical application: using Spring Data REST to expose repositories in REST.

💡 Useful information

Our training sessions are offered in Montreal or Quebec City, in person or in virtual format. Dates and locations are provided when you select your session below. If you have any questions regarding registration, schedules, the language of instruction, or cancellation policies, please consult our FAQ .

Duration
1.5 days
Schedule
See training dates for details
Regular fee
$875
Preferential fee A preferential rate is offered to public institutions, to members of certain professional organizations as well as to companies that do a certain amount of business with Technologia. To know more, please read the "Registration and rates" section on our FAQ page. Please note that preferential rates are not available for online training courses. Discounts cannot be combined with other offers.
$785
Private or personalized training

Do you have several employees interested in the same training course? Whether in person at your offices or remotely in virtual mode, we offer private training courses tailored to your team's needs. Group rates are available. Contact us for more details or request a quote online.

Request a quote

Request in-company training

Do you have several employees interested in the same training course? Whether in person at your offices or remotely in virtual mode, we offer private training courses tailored to your team's needs. Group rates are available. Contact us for more details or request a quote online.

Tell us more
Added to cart View my cart