3
Querying for Data with Spring Boot
In the previous chapter, we learned how Spring Boot manages embedded servlet containers, automatically registers our web controllers, and even provides JSON serialization/deserialization, easing the creation of APIs.
What application doesn’t have data? Spoiler alert – none. That’s why this chapter is focused on learning some of the most powerful (and handy) ways to store and retrieve data.
In this chapter, we’ll cover the following topics:
- Adding Spring Data to an existing Spring Boot application
- DTOs, entities, and POJOs, oh my!
- Creating a Spring Data repository
- Using custom finders
- Using Query By Example to find tricky answers
- Using the custom Java Persistence API (JPA)
Being able to store and retrieve ...
Get Learning Spring Boot 3.0 - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.