1

Why to choose Spring Data JPA Over Hibernate ? Assuming I am developing Spring MVC + Spring REST + Spring Security application using Oracle.

  • check this question, it may give you an insight into JPA and hibernate http://stackoverflow.com/questions/9881611/whats-the-difference-between-jpa-and-hibernate – Akintayo Jabar Dec 12 '16 at 10:55
  • Hibernate is a JPA implementation whereas Spring Data JPA is a querying framework for JPA, so there is no choice between because they are two complete different things. – Robert Niestroj Dec 12 '16 at 13:57
  • So are you saying that we can use both ? More details would be appreciated.. –  Dec 13 '16 at 05:40

1 Answers1

0

If you are using Spring Data in your project, you are not going to write most of the low level data access operations like writing SQL query, DAO classes etc. Spring Data will generate everything dynamically at run-time by creating the proxy instances of your abstract repositories and perform the required operations. What you write is the abstract interfaces that define the required operations.