This is Java based, Spring Boot API. Steps to run the application.
-
Clone/Download the project and import it to Eclipse.
-
From Project Explorer
- Right-click on project name -> Maven -> Update Project.. -> Check offline && Force Update of Snapshots/Releases.
- Right-click on project name then click on Show in a local terminal.
- Run command
mvn install -U -e
to do maven package/install. - Right-click on project name -> Run As -> Spring Boot App.
-
To the correct syntax for JSON input String, 1 Once the application will start running, Open postman and make a GET call with the URL "http://localhost:9090/orders" and remove the '[' & ']' square brackets from returned JSON String.
-
Now paste the example JSON string under Body (type JSON) of Postman and make a POST call to URL "http://localhost:9090/getOrders" for getting desired output (Total cost for your order).