Skip to content

RetailApplication to get price and ther details of a product using REST interface

Notifications You must be signed in to change notification settings

bhatRV/RetailApplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Environement/Software and dependency Requirements to run :

Java 8.x Cassandra 3.11.x Rest client Spring boot maven 3.x

dependency: swagger,springboot 1.5.x

Database Pre configurations:

CREATE KEYSPACE IF NOT EXISTS target WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : N };

create table if not exists target.product_pricing (id int PRIMARY KEY, currency text, price double );

Application configurations:

Application PORT and cassandra details should be provided in application.properties and cassandra.properties respectively

Build using maven

mvn clean install -DskipTests=true

RUNNING THE APPLICATION

java -jar <jarpath/jarname>

eg. java -jar /home/rvretailservice-0.0.1-SNAPSHOT.jar

Swagger URL

http://localhost:9080/swagger-ui.html#/retail-rest-controller

Supported Operations:

swagger url to know more details: http://localhost:9080/swagger-ui.html#/retail-rest-controller

  1. GET single Product by its Id
  2. Create a product with price details
  3. Update the price.

Assumptions:

Product name is provided by external rest based interface

REQUEST FORMATS

  1. URL for POST request : http://localhost:9080/product/

POST Json body format:

{ "id":"", "name":"RASHMI", "priceDetails":{ "price":"11", "currency":"USD" } }

  1. Get request URL: http://localhost:9080/product/

  2. Put will have similar format as POST.

VALIDATIONS

Basic validation are provided for the CRUD operations mentioned above

About

RetailApplication to get price and ther details of a product using REST interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages