This Spring Boot project provides functionality to save Excel file data into both SQL and NoSQL databases. It offers flexibility and scalability by supporting multiple database technologies.
- Parse Excel file data and convert it into Java objects.
- Save data into SQL database (e.g., MySQL) using Spring Data JPA.
- Save data into NoSQL database (e.g., MongoDB) using Spring Data MongoDB.
- Error handling and transaction management for data integrity.
- Spring Boot
- Apache POI for Excel parsing
- Spring Data JPA for SQL database interaction
- Spring Data MongoDB for NoSQL database interaction
- MySQL (or other SQL database)
- MongoDB (or other NoSQL database)
-
Clone the repository:
git clone https://github.com/swapniltake1/excel-to-db.git
-
Navigate to the project directory:
cd excel-to-db
-
Configure database settings in
application.properties
:# SQL Database Configuration spring.datasource.url=jdbc:mysql://localhost:3306/your_database_name spring.datasource.username=your_username spring.datasource.password=your_password spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver # NoSQL Database Configuration spring.data.mongodb.host=localhost spring.data.mongodb.port=27017 spring.data.mongodb.database=your_database_name
-
Run the application:
./mvnw spring-boot:run
- Upload an Excel file using the provided API endpoint.
- The application will parse the Excel data and save it into both SQL and NoSQL databases.
- Verify the data in both databases to ensure successful import.
Contributions are welcome! Please feel free to open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.