The project will run using an embedded Tomcat server and the methods are exposed as REST services.
System requirements
- Java 8
- Maven 3.x.x
- Docker (if running with docker)
To start the application normally
mvn package
java -jar target/spring-rest-0.0.1-SNAPSHOT.jar
To start the application with docker
docker container run -p 8080:8080 -d --name <CONTAINER NAME> shazahmed/spring-boot-rest
Once the application is running, the following REST services are available:
-
Adding an item to store
-
Adding an item to cart
-
Getting cart items
-
Getting cart total
###Notes
- Instead of a database, and in memory hashmap has been used to store data. Hence, on each restart data will get erased.
##TODO
- Add Swagger