quickstarts/state_management/java/http
amardeep2006 bc0430a277 feat: upgraded springboot to 3.3.1 and bumped up other dependencies to latest.
docs: Updated read me files to use Java 17 as baseline
Signed-off-by: amardeep2006 <amardeep2006@gmail.com>
2024-06-29 15:10:27 +05:30
..
order-processor feat: upgraded springboot to 3.3.1 and bumped up other dependencies to latest. 2024-06-29 15:10:27 +05:30
README.md feat: upgraded springboot to 3.3.1 and bumped up other dependencies to latest. 2024-06-29 15:10:27 +05:30
dapr.yaml Merging `release-1.12` into main branch (#952) 2023-10-13 16:10:27 -07:00
makefile Removed docker image prefix addition step 2022-07-25 12:28:57 -07:00

README.md

Dapr state management (HTTP Client)

In this quickstart, there is a order-processor microservice to demonstrate Dapr's state management API. The service generates messages to store in a state store.

Visit this link for more information about Dapr and State Management.

Note: This example leverages HTTP requests only. If you are looking for the example using the Dapr Client SDK (recommended) click here.

Pre-requisites

This quickstart includes one service: Java client service order-processor

Run multiple apps with multi-app run template file

This section shows how to run applications at once using multi-app run template files with dapr run -f .. This enables to you test the interactions between multiple applications.

Open a new terminal window and run order-processor using the multi app run template defined in dapr.yaml:

Run Java service with Dapr

  1. Open a new terminal window and navigate to order-processor directory:
  cd ./order-processor
  mvn clean install
  cd ..
  1. Run the Java service app with Dapr:
  dapr run -f .
  1. Stop and cleanup application process
dapr stop -f .

Run a single app at a time with Dapr (Optional)

  1. Open a new terminal window and navigate to order-processor directory:
cd ./order-processor
mvn clean install
cd ..
  1. Run the Java service app with Dapr:
cd ./order-processor
dapr run --app-id order-processor --resources-path ../../../resources/ -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
  1. Stop and cleanup application process
dapr stop --app-id order-processor