This project uses gradle and uses the default tasks to compile and run unit tests.
./gradlew clean assemble check
- Build the docker container
./gradlew clean assemble check docker
- Run Docker Compose to start up the application and MySQL service.
docker-compose up --build
- Run Docker Compose to stop the application and MySQL service
docker-compose down --rmi all
The app defines following CRUD APIs.
BaseURL: http://localhost:8080
Test the endpoints using Postman or any other REST Client.
Method | Url | Description | Sample Valid Request Body |
---|---|---|---|
POST | /relay/api/invoices | Create new invoices | JSON |
[
{
"invoiceNumber": "INVC-01",
"value": "100.00"
},
{
"invoiceNumber": "INVC-02",
"value": "110.00"
},
{
"invoiceNumber": "INVC-03",
"value": "120.00"
}
]
Method | Url | Description | Sample Valid Request Body |
---|---|---|---|
POST | /relay/api/creditnotes | Create new credit notes | JSON |
[
{
"creditNumber": "CRN-01",
"value": "50.00"
},
{
"creditNumber": "CRN-02",
"value": "55.00"
},
{
"creditNumber": "CRN-03",
"value": "60.00"
}
]
Method | Url | Description | Sample Valid Request Body |
---|---|---|---|
GET | /relay/api/getAggregatedView | Get Aggregated List of invoices and credit notes |
./gradlew tasks