Welcome to the Spring Data JPA with Spring Boot repository! This repository contains hands-on demos to help you master Spring Data JPA, from basic CRUD operations to advanced features like transactions, query methods, and multiple database support.
- Project Setup for Spring Data JPA
- CRUD operations using Spring ORM
- CRUD using Spring Data JPA
- Pagination and Sorting
- Query by methods
- Query by annotations
- Criteria API
- Transactions
- Propagation, Anomalies and Isolation in Transactions
- Embedded database
- Multiple database
- Unit Testing
- Petistaan
These demos have been built using JDK 21, Spring Framework 6, and Spring Boot 3. While it is recommended to have JDK 21 installed, the examples can be adapted to other Java versions with minimal modifications.
The database used in these examples is MySQL, but the code can be adjusted to work with other databases if needed.
Before diving into Spring Data JPA, ensure you're comfortable with the following concepts:
- Java Basics
- Java Advanced
- Java Database Connectivity (JDBC)
- Maven
- Hibernate
- Spring Basics with Spring Boot
Follow these steps to set up and execute the demos:
- Clone the repository.
- Import the project into your preferred IDE as a Maven Project.
- Configure the database connection, if necessary.
- Run the application and test the methods.
If you're a beginner, it's best to execute the demos in the given order to build your understanding progressively. If you're experienced, feel free to explore specific demos based on your needs.
These demos are explained in detail on my YouTube channel Abhishek Verma. Watch the complete playlist here: Spring Data JPA with Spring Boot.
🚀 Stay healthy, keep learning, and keep growing!