nrslib / akka-java-sample-order-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java akka Sample

Configuration

application.conf

  • Run on inmemory
include classpath("persistence/inmemory.conf")
# include classpath("persistence/local.conf")
  • Run on LevelDB
# include classpath("persistence/inmemory.conf")
include classpath("persistence/local.conf")

API

Create order

curl --location --request POST 'localhost:8081/api/orders' \
--header 'Content-Type: application/json' \
--data-raw '{
    "accountId" : "test-account-id",
    "detail" : {
        "items" : []
    }
}'

Make order shipped

curl --location --request POST 'localhost:8081/api/orders/{order-id}/make-shipped'

Cancel order

curl --location --request POST 'localhost:8081/api/orders/{order-id}/cancel'

Cancel due to discontinuation

curl --location --request POST 'localhost:8081/api/orders/{order-id}/cancel-discontinuation'

About


Languages

Language:Java 100.0%