官术网_书友最值得收藏!

  • Spring 5.0 By Example
  • Claudio Eduardo de Oliveira
  • 232字
  • 2021-06-24 19:17:40

Spring Data JPA

The Spring Data JPA provides an easy way to implement a data access layer using the JPA specification from Java EE. Usually, these implementations had a lot of boilerplate and repetitive code and it was hard to maintain the changes in the database code. The Spring Data JPA is trying to resolve these issues and provides a comprehensible way to do that without boilerplate and repetitive code.

The JPA specification provides an abstraction layer to interact with different database vendors that have been implemented. Spring adds one more layer to the abstraction in a high-level mode. It means the Spring Data JPA will create a repositories implementation and encapsulate the whole JPA implementation details. We can build our persistence layer with a little knowledge of the JPA spec.

The JPA Specification was created by the JCP ( Java Community Process) to help developers to persist, access, and manage data between Java classes and relational databases. There are some vendors that implement this specification. The most famous implementation is Hibernate ( http://hibernate.org/orm/), and by default, Spring Data JPA uses Hibernate as the JPA implementation.

Say goodbye to the DAO (Data Access Object) pattern and implementations. The Spring Data JPA aims to solve this problem with a well-tested framework and with some production-ready features.

Now, we have an idea of what the Spring Data JPA is. Let's put it into practice.

主站蜘蛛池模板: 壶关县| 灵石县| 桃园市| 遂平县| 南宁市| 南丰县| 六安市| 大城县| 府谷县| 儋州市| 大埔县| 宁津县| 金寨县| 逊克县| 高清| 扎囊县| 鄂尔多斯市| 宣武区| 子长县| 六安市| 桂平市| 鄂温| 怀远县| 应城市| 阿图什市| 东乡县| 大冶市| 花垣县| 五家渠市| 清河县| 武夷山市| 江川县| 万载县| 永修县| 旌德县| 讷河市| 凉城县| 洪湖市| 京山县| 茂名市| 会同县|