Skip to content

sreeja23ed/db-integration-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DB Integration Service

The DB Integration Service is a Spring Boot–based microservice that integrates data between MongoDB and MySQL.
It provides RESTful APIs to insert student records into MongoDB and then synchronize them into MySQL.
This project demonstrates how to connect multiple databases in a single Spring Boot application.


📌 Overview

This service allows you to:

  • Insert student records into MongoDB.
  • Retrieve student records directly from MongoDB.
  • Synchronize student data from MongoDB → MySQL.
  • Manage multiple data sources in one Spring Boot service.

It’s a great starting point for learning how to:

  • Use Spring Data JPA with MySQL.
  • Use Spring Data MongoDB with MongoDB.
  • Expose REST APIs for multi-database integration.
  • Sync data between a NoSQL and a relational database.

🚀 Features

  • Insert student records into MongoDB.
  • Retrieve students from MongoDB.
  • Sync data between MongoDB and MySQL.
  • Clean separation of Controller, Service, and Repository layers.

🛠️ Tech Stack

  • Java 17
  • Spring Boot (REST APIs, dependency injection)
  • MongoDB (NoSQL database)
  • MySQL (Relational database)
  • Spring Data JPA & Spring Data MongoDB
  • Maven (Build tool)

📂 Endpoints

HTTP Method Endpoint Description
POST /students/mongo Inserts a student into MongoDB
GET /students/mongo Retrieves all students from MongoDB
POST /students/sync Syncs data from MongoDB → MySQL

📋 Requirements

Before running the project, ensure you have:

  • Java 17+ installed
  • Maven installed
  • MongoDB running locally
    (Default: mongodb://127.0.0.1:27017)
  • MySQL running locally
    (Default: jdbc:mysql://localhost:3306/studentdb)

▶️ Running the Project

  1. Clone the repository:
    git clone https://github.com/sreeja23ed/db-integration-service.git
    cd db-integration-service

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages