DAPR will provide all this container and infrastructure
dapr run --app-id my_app --app-port 6001 --dapr-http-port 3601 --dapr-grpc-port 60001 -- java -jar statetest-0.0.1-SNAPSHOT.jar
DAPR has a state management and other capabilities. It will store the state in redis.
curl -X POST -H "Content-Type: application/json" -d '[{ "key": "order_sean", "value": "250"}]' http://localhost:3601/v1.0/state/statestore
curl http://localhost:3601/v1.0/state/statestore/order_sean
Link to installation command: https://docs.dapr.io/getting-started/install-dapr-cli/
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
- docker - without docker dapr will not work. It needs to start other container such as Redis.
- Java for SpringBoot Framework - the jar files provided are compile using java version "18.0.1.1". You will need java 18 or higher to run
dapr init
dapr -h
The jar file statetest-0.0.1-SNAPSHOT.jar is build using eclipse IDE.
Add to include dapr.
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk</artifactId>
<version>1.9.0</version>
</dependency>
<!-- Dapr's SDK for Actors (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-actors</artifactId>
<version>1.9.0</version>
</dependency>
<!-- Dapr's SDK integration with SpringBoot (optional). -->
<dependency>
<groupId>io.dapr</groupId>
<artifactId>dapr-sdk-springboot</artifactId>
<version>1.9.0</version>
</dependency>
Add proxy to this file: C:\Users<user>.m2\settings.xml
<proxies>
<proxy>
<host>proxy---.---.com</host>
<port>912</port>
</proxy>
</proxies>