mirror of https://github.com/dapr/quickstarts.git
* Updating CLI and runtime versions to final 1.14.0 release Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> * Updating golang quickstarts with `go get -u github.com/dapr/go-sdk@v1.11.0` Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> * Updating Java quickstarts to <version>1.12.0</version> Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> * Fixed up go build errors with go mod tidy Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> * Dapr runtime to 1.14.1 Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> --------- Signed-off-by: Paul Yuknewicz <paulyuk@microsoft.com> |
||
---|---|---|
.. | ||
order-processor | ||
README.md | ||
dapr.yaml | ||
makefile |
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 Dapr SDK client. If you are looking for the example using the HTTP Client click here.
Pre-requisites
- Dapr and Dapr Cli.
- Java JDK 17 (or greater):
- Apache Maven version 3.x.
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
- Open a new terminal window and navigate to
order-processor
directory:
cd ./order-processor
mvn clean install
cd ..
- Run the Java service app with Dapr:
dapr run -f .
- Stop and cleanup application process
dapr stop -f .
Run a single app at a time with Dapr (Optional)
- Open a new terminal window and navigate to
order-processor
directory:
cd ./order-processor
mvn clean install
cd ..
- 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
- Stop and cleanup application process
dapr stop --app-id order-processor