To run with IntelliJ:
- Click to run class
ku.shop.ShopServiceApplication
To compile and run with Maven:
$ mvn spring-boot:run
To set tax calculator:
- Default uses Thailand tax rate. If you need to change,
set environment variable
TAX_CITY
. For example,
TAX_CITY=Thailand
- You can choose tax cities among
Thailand
,NY
,CA
. Please see classku.shop.service.ServiceConfig
for tax city configuration.
Possible calls:
-
GET all products
-
GET specific product with id
-
POST order
-
POST a product (create using json format)
{ "id": 5, "name": "Ham", "price": 60 }