Backend Springboot Rest API hosted on EC2 AWS.
- This repository contains a backend microservice developed in Spring Boot to extract relevant information from JSON receipt structures.
- Built following industry conventions for REST APIs.
- Utilizes an H2 in-memory database with a one-to-many relationship between Receipt and Item entities.
Used Junit4 and Mockito for writing testcases and stubbing database calls.
All test cases have been successfully passed for below scenarios
- Invalid Recipet
- Valid Recipet
- Id not present for viewing getPoints
- Id present for viewing getPoints
To run the service using Docker, execute the following commands:
-
Java 17
-
Maven 3.9.8 verify Maven install by typing
mvn -version
-
Now go to project directory and run
mvn clean install
-
This generates a target folder in the project directory
-
Now finally run the below docker commands to run this microservice in a container
docker build -t receipt-processor . docker run -p 8080:8080 receipt-processor
-
Go to http://localhost:8080/swagger-ui/index.html#/fetch-controller where you can test the two endpoints.