Here is a sample README.md for your Java 21, Spring Boot, JPA, and Docker microservice project:
This was for my final interview with DHL e-commerce for a Senior Software Engineer role.
No offer.
This simple microservice calculates shipping rates for packages based on order details. Built with Java 21, Spring Boot, JPA, and Docker, it demonstrates best practices for modern Java backend development.
- Java 21
- Gradle 7.x+
- Docker & Docker Compose
git clone https://github.com/your-org/your-repo.git
cd your-repo./gradlew clean build./gradlew bootRun./gradlew testdocker-compose up --builddocker-compose downdocker-compose logs -f- POST
/packages - Request Body (JSON):
{ "date": "2024-06-10T15:30:00", "originatingAddress": { "addressLine1": "123 Main St", "addressLine2": "Apt 1", "city": "Springfield", "state": "IL", "zipCode": 62701 }, "destinationAddress": { "addressLine1": "456 Elm St", "addressLine2": "Suite 200", "city": "Chicago", "state": "IL", "zipCode": 60601 } }
- GET
/packages/{packageId} - Response (
200 OK):{ "packageId": 123, "date": "2024-06-10T15:30:00", "originatingAddress": { "addressLine1": "123 Main St", "addressLine2": "Apt 1", "city": "Springfield", "state": "IL", "zipCode": 62701 }, "destinationAddress": { "addressLine1": "456 Elm St", "addressLine2": "Suite 200", "city": "Chicago", "state": "IL", "zipCode": 60601 }, "rate": 9.99, "currency": "USD", "status": "CREATED" }
- Update endpoint URLs and request/response fields as per your implementation.
- Use environment variables or
application.ymlfor configuration. - For further details, see the source code and comments.