2 Starting a project
This chapter covers
- Overviewing the Hibernate and Spring Data projects
- Developing a “Hello World” with Jakarta Persistence API, Hibernate, and Spring Data
- Examining the configuration and integration options
In this chapter, we’ll start with Jakarta Persistence API (JPA), Hibernate, and Spring Data using a step-by-step example. We’ll see the persistence APIs and how to benefit from using either standardized JPA, native Hibernate, or Spring Data. We first offer a tour through JPA, Hibernate, and Spring Data with a straightforward “Hello World” application. We remind that JPA (Jakarta Persistence API, formerly Java Persistence API), is the specification defining an API that takes care of managing the persistence of objects and object-relational mappings – it will tell what to do to persist objects. Hibernate, the most popular implementation of this specification, will tell how to effectively make the persistence. Spring Data makes the implementation of the persistence layer even more efficient and is an umbrella project that adheres to the Spring framework principles and comes with an even simpler approach.
2.1 Introducing Hibernate
Object-relational mapping (ORM) is a programming technique making the connection between the incompatible worlds of object-oriented systems and relational databases.