All Articles

JPA Repository

Spring Data Repositories

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repositories

Concept

  • reduce the amount of boilerplate code to implement data access layers for persistence data
  • Central Interface is Repository T: domain class, ID: ID type JPARepository extends CrudRepository extends Repository<T, ID>

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#reference

Query Method

  • CRUD functionality to query on the datastore
  • Set up Spring to create proxy instances for those interfaces

    • JavaConfig
    • XML to define a bean

Query Method Creation

predicate keywords

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#reference