O'Reilly logo

Spring Data by Petri Kainulainen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Building Queries with Spring Data JPA

We have learned how we can configure Spring Data JPA and implemented a simple CRUD application. Now it is time that we learn some skills that will help us to implement real-life applications. In this chapter, we will cover:

  • How we can use query methods for creating queries
  • How we can create dynamic queries by using the JPA Criteria API
  • How we can use Querydsl for creating dynamic queries
  • How we can sort and paginate query results

In the course of this chapter, we will extend our contact manager application by adding a search function to it. The requirements of the search function are as follows:

  • The search function must return all contacts whose first name or last name start with the given search term ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required