In Spring Data JPA, when you define a derived query method like List<Restaurant> findByAddress(String addr) or a custom query method, you're instructing Spring Data JPA to automatically generate the implementation at runtime, based on the method name and parameter or based on custom JPQL.

Steps followed by Spring Data behind the scenes:

  1. It parses the Method Name or custom query

  2. Binding the Parameter

  3. Creating a Proxy at Runtime

  4. Query Execution