- Create a method with a name including all attributes you want to query by in your PersonRepository interface that implements CrudRepository<> (or PagingAndSortingRepository<>)
- Create a Specification object and use Spring findAll to find all records matching the Specification.
- Use @Query in the PersonRepository and define the query using JQL
- Use GraphQL (see for example https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#core.extensions.querydsl)
Friday, June 7, 2019
Querying for Data in a Java Spring App - Alternatives
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment