https://github.com/mohamad-shosha/spring-jpa
"The project showcases the use of JPA for database operations and Hibernate for Object-Relational Mapping (ORM), providing seamless backend integration for managing and querying data, along with Docker and Docker Compose configurations to facilitate containerization and deployment."
https://github.com/mohamad-shosha/spring-jpa
docker docker-compose dockerfile dockerhub hibernate java jpa-repository liquibase maven mysql spring-boot
Last synced: 6 months ago
JSON representation
"The project showcases the use of JPA for database operations and Hibernate for Object-Relational Mapping (ORM), providing seamless backend integration for managing and querying data, along with Docker and Docker Compose configurations to facilitate containerization and deployment."
- Host: GitHub
- URL: https://github.com/mohamad-shosha/spring-jpa
- Owner: Mohamad-shosha
- Created: 2024-09-22T11:54:57.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-16T02:30:43.000Z (over 1 year ago)
- Last Synced: 2025-07-08T08:48:46.109Z (about 1 year ago)
- Topics: docker, docker-compose, dockerfile, dockerhub, hibernate, java, jpa-repository, liquibase, maven, mysql, spring-boot
- Language: Java
- Homepage: https://spring.io/projects/spring-data-jpa
- Size: 34.2 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring-Jpa
This project demonstrates the use of Java Persistence API (JPA) for database operations and Hibernate for Object-Relational Mapping (ORM). It provides seamless backend integration for managing and querying data, featuring three main entities: Instructor, Address, and Course. Liquibase is used for database schema management, and Postman is utilized as a client for testing the API.
## 📝 Table of Contents
- [Features](#features)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Technologies](#technologies)
- [Demo](#demo)
- [Docker](#docker)
- [Resources](#resources)
## 🚀 Features
- *Create, Read, Update, and Delete* operations for Instructor, Address, and Course.
- *RESTful API* design for easy interaction.
- *Spring Boot* for backend development with automatic configuration and dependency management.
- *JPA & Hibernate* for efficient ORM and database interactions.
- *Liquibase* for database versioning and migrations.
- *Postman* for testing API endpoints.
Explore the powerful features of this project:
### 1. *Create*
Add new Instructor, Address, or Course entities through a straightforward API.
### 2. *Read*
Retrieve data for Instructor, Address, or Course entities.
### 3. *Update*
Modify existing entities with ease.
### 4. *Delete*
Remove entities with a single API call.
---
## 📖 Prerequisites
Before you begin, ensure you have the following:
- *Java Development Kit (JDK)* installed (preferably JDK 11 or later).
- *Maven* installed for dependency management.
- Your favorite IDE (e.g., IntelliJ IDEA, Eclipse) for code editing.
- *Postman* for API testing.
---
## ✨ Getting Started
### Step 1: Create a Spring Boot Project
Generate a new Spring Boot project using [Spring Initializr](https://start.spring.io/) with the following settings:
- Project: Maven Project
- Language: Java
- Spring Boot: Latest stable version
- Packaging: Jar
- Dependencies: Spring Web, Spring Data JPA, Liquibase, MySQL Driver
Click "Generate" to download the project zip file.
### Step 2: Extract and Import into IDE
Extract the downloaded zip file and import the project into your preferred IDE.
### Step 3: Configure Database and Liquibase
- *Database Configuration*: Update `application.properties` or `application.yml` with your database connection details.
- *Liquibase Configuration*: Configure Liquibase in your `application.properties` and add your changelog files in `src/main/resources/db/changelog`.
### Step 4: Define Entities
Create entity classes for Instructor, Address, and Course in your project.
### Step 5: Create Repository Interfaces
Create repository interfaces for each entity to perform CRUD operations.
### Step 6: Implement Controllers
Create REST controllers to handle HTTP requests and interact with your repositories.
### Step 7: Test Using Postman
Use Postman to test your API endpoints by sending requests to create, read, update, and delete entities.
### Step 8: Run Your Application
Run your Spring Boot application. The server will start at `http://localhost:8080`.
---
## 📚 Technologies
- *Spring Boot*: For building the backend application.
- *JPA & Hibernate*: For ORM and database interactions.
- *Liquibase*: For database schema management and migrations.
- *MySQL*: As the database.
- *Postman*: For API testing.
---
## 🎥 Demo
[Watch the demo video here](https://github.com/your-repo/demo-link).
---
## 🐳 Docker
To push your Docker image to Docker Hub, use the following command:
```bash
docker push mohamadshosha/spring-jpa-app:tagname
```
## 🗂 Resources
- [Spring Boot Documentation](https://spring.io/projects/spring-boot)
- [JPA and Hibernate Guide](https://docs.jboss.org/hibernate/orm/current/userguide/html_single/)
- [Liquibase Documentation](https://www.liquibase.org/documentation/index.html)
- [Postman Documentation](https://learning.postman.com/docs/)