Spring Data JPA simplifies working with databases in Spring Boot applications you don’t have to write SQL for common database operations.
What is Spring Data?
Spring Data is a part of the larger Spring Framework that aims to make it easier to access and work with databases.
Think of it like a helper tool that allows you to create database queries using Java interfaces, without writing raw SQL.
Modules of Spring Data
Spring Data is made up of multiple modules. Here are the most common:
Module | Description |
---|---|
Spring Data JPA | Works with JPA/Hibernate for relational DBs |
Spring Data MongoDB | For working with MongoDB |
Spring Data Redis | For working with Redis |
Spring Data JDBC | For simpler JDBC access (without JPA) |
Spring Data Elasticsearch | For working with Elasticsearch |
Since you're using PostgreSQL, you're working with Spring Data JPA.
Features of Spring Data
CrudRepository