How Spring Data JPA provide Data Access Interface instead of hibernate Data Access Layer

前端 未结 1 1839
面向向阳花
面向向阳花 2021-01-27 14:54

When When I explored hibernate JPA implementation , I got the idea of working with hibernate and creation of data access layer for fetching and inserting data into and from data

相关标签:
1条回答
  • 2021-01-27 15:23

    Spring Data creates a Proxy for the interface and for each method tries different strategies for finding/creating an implementation of the method.

    The methods of CrudRepository are implemented in the SimpleJpaRepository for other methods objects get created based on annotations, parameter and return types and the method name which then get invoked by the proxy.

    There is a wiki article about the basic concepts that might be helpful.

    0 讨论(0)
提交回复
热议问题