Spring Boot 3 Crash Course Part 3: Hibernate and Persist

Ben Meehan
15 min readNov 11, 2023

Before delving into the creation of robust APIs, Let’s take a quick diversion to learn about how we can access a database in Spring and save and retrieve our data efficiently.

Part 2 — Link

Part 4 is now available: Here

Pre-Requisites:

  1. Knowledge of what is a Database and DBMS.
  2. A little bit of SQL basics.

Table Of Contents:

  1. Using a database in spring
  2. The easier way to use databases
  3. What is hibernate?
  4. Setting up a free database
  5. Setting up the Spring Boot project
  6. Connecting to a database
  7. Repositories, Entity Managers and Contexts
  8. CRUD operations using hibernate

Using A Database In Spring:

Spring provides a JDBC dependency for database access. Spring JDBC simplifies database interaction in Java applications by handling many of the tedious and error-prone tasks associated with database access.

JDBC stands for Java Database Connectivity. It is a Java-based API (Application Programming Interface) that allows Java…

--

--

Ben Meehan

Software Engineer at Razorpay. Sharing knowledge and experiences.