Skip to content

Complete Project - All Three Levels Completed

Latest

Choose a tag to compare

@ecantosf ecantosf released this 02 Apr 15:56
· 6 commits to main since this release

Project Overview

Three independent Spring Boot REST APIs implementing full CRUD operations with different databases.

Level Database Status Tests
Level 1 H2 ✅ Complete 13 tests
Level 2 MySQL ✅ Complete 39 tests
Level 3 MongoDB ✅ Complete 21 tests

Level 1 - H2 CRUD API

Features

✅ Full CRUD operations for Fruit entity
✅ H2 in-memory database with JPA/Hibernate
✅ DTO pattern with Bean Validation
✅ Global exception handling (404, 400, 500)
✅ Unit tests with Mockito (6 tests)
✅ Integration tests with MockMvc (7 tests)
✅ Docker multi-stage build
✅ OpenAPI/Swagger documentation
✅ H2 Console available at /h2-console

Level 2 - MySQL with Relationships

Features
✅ Full CRUD operations for Provider and Fruit entities
✅ MySQL database with JPA/Hibernate
✅ Bidirectional relationship @onetomany / @manytoone
✅ DTO pattern with nested provider data in fruit responses
✅ Custom exceptions: DuplicateResourceException, BusinessException
✅ Global exception handling (404, 409, 400, 500)
✅ Unit tests with Mockito (19 tests)
✅ Integration tests with MockMvc (20 tests)
✅ Docker multi-stage build and docker-compose for MySQL
✅ OpenAPI/Swagger documentation
✅ phpMyAdmin available at http://localhost:8080/

Level 3 - MongoDB with Embedded Documents

Features
✅ Full CRUD operations for Order entity
✅ MongoDB database with Spring Data MongoDB
✅ Embedded documents (OrderItem inside Order)
✅ DTO pattern with nested item data
✅ Custom validation: @FutureDeliveryDate (delivery date must be at least tomorrow)
✅ Global exception handling (404, 400, 500)
✅ Unit tests with Mockito (10 tests)
✅ Integration tests with MockMvc (11 tests)
✅ Docker multi-stage build and docker-compose for MongoDB
✅ OpeAPI/Swagger documentation
✅ Mongo Express available at http://localhost:8081/