Spring + hibernate versus Spring Data JPA: Are they different?

前端 未结 4 976
既然无缘
既然无缘 2021-01-31 02:10

Although not novice, I am trying to learn spring framework (again!) in order to be sure that I really understand this. I have got fair idea on core Spring (DI). Now, I am focusi

4条回答
  •  爱一瞬间的悲伤
    2021-01-31 02:59

    I find this link helpful:

    JPA is the Java Persistence API, which is Java's standard API for object-relational mapping.

    JPA is only an specification - you need an implementation of it to be able to use it. Hibernate is one of the most well-known and most used implementations of JPA, but there are others, such as EclipseLink JPA.

    The Spring Framework is a large framework to help you write enterprise-grade software easier. It contains support for many Java technologies, including JPA.

    The Spring Framework consists of a collection of projects, and one of these projects is Spring Data.

    The goal of Spring Data is to make it easier to work with different kinds of databases, from traditional relational databases to NoSQL databases. Spring Data supports JPA via the Spring Data JPA subproject.

    To write a program that uses JPA, you need at least a JPA implementation, such as Hibernate.

    If you are using the Spring Framework for your application, you will most likely want to use Spring Data JPA together with Hibernate.

提交回复
热议问题