Compare commits
211 Commits
Author | SHA1 | Date |
---|---|---|
|
7cf6533afd | |
|
2454fec841 | |
|
e3fc48d4eb | |
|
981b3b457b | |
|
dcaca773b3 | |
|
e13f934efe | |
|
3a8fd611da | |
|
7e2f81d0e3 | |
|
13a973bf5a | |
|
447e2bfa86 | |
|
114e354363 | |
|
1852cc5590 | |
|
c466d1b743 | |
|
e6f7c6eb06 | |
|
6cecd76745 | |
|
ba3b529830 | |
|
949584f69f | |
|
a99d286a88 | |
|
8ea5ea4f4b | |
|
7291d4c74d | |
|
1e4bcf9b9f | |
|
c3592b446d | |
|
e84d2c4e61 | |
|
e4cc0303fa | |
|
c07e07b782 | |
|
a1ec3ce898 | |
|
910b13ba56 | |
|
824f357f58 | |
|
daf4c8b703 | |
|
551d205b1d | |
|
4e1fbbe2ce | |
|
ab8e41111d | |
|
7ed4d9184c | |
|
ecc94f5b94 | |
|
dcf2d3e359 | |
|
99e21db465 | |
|
c53f000ef2 | |
|
b7e45a06c1 | |
|
80c3a6d122 | |
|
de2dc63389 | |
|
67c5991697 | |
|
8b8684a2db | |
|
9b635dae6d | |
|
ed9a3fb77b | |
|
128cfdeb4b | |
|
ef1fc2242a | |
|
8cb80997cf | |
|
0572e244cb | |
|
02733dcc15 | |
|
505b93acb5 | |
|
bc2b04f24b | |
|
de82451a38 | |
|
f0c35968f4 | |
|
c909d26811 | |
|
58b7f256a3 | |
|
16f9da0c4b | |
|
7990ed79ec | |
|
7b82d7336b | |
|
57f6b96d60 | |
|
c1ee14100b | |
|
ffbb5b39bd | |
|
42b2d88216 | |
|
e2a944eea6 | |
|
5ebc5e359e | |
|
19c662cc2d | |
|
a03f22064e | |
|
bb48276691 | |
|
18a036c193 | |
|
c9b013f0c1 | |
|
641b34a107 | |
|
ff917acf4f | |
|
465c9e0a8d | |
|
ad917d215b | |
|
ed95feeaf4 | |
|
247502a1b1 | |
|
d6c14dee69 | |
|
54f3997bd1 | |
|
7994fe8997 | |
|
5eed6953a1 | |
|
6108547fc2 | |
|
36a0140398 | |
|
efce229985 | |
|
5dbeafc24a | |
|
59abd5dbcc | |
|
510679e295 | |
|
bd3a54d6c4 | |
|
22d9874ae0 | |
|
0cec586d35 | |
|
58d6218861 | |
|
cf7405f976 | |
|
be5530fdd7 | |
|
be0e56bf50 | |
|
0fafc97229 | |
|
9cd6db2f5d | |
|
380cda68f8 | |
|
69f24075f6 | |
|
3a54a5e8c5 | |
|
5413bd0993 | |
|
6fd5a5a784 | |
|
dec757cba5 | |
|
637927ec18 | |
|
7a07a6e437 | |
|
1b37a1c65c | |
|
c21e283ca3 | |
|
e8a901017f | |
|
8b138da07a | |
|
fcdf3c3188 | |
|
bd1667b043 | |
|
83e175355e | |
|
3dc96d7d73 | |
|
be05a47fd8 | |
|
0b7a051b79 | |
|
b683fcec55 | |
|
b1196d3777 | |
|
7dcab0bc68 | |
|
6a6901d43e | |
|
8a0913d4a2 | |
|
cb552ba668 | |
|
7490434dde | |
|
cedaebc157 | |
|
436b7df427 | |
|
cc537a4c20 | |
|
4b83da6327 | |
|
9b927c84c2 | |
|
702aa058f7 | |
|
935f3be367 | |
|
a6923ed75c | |
|
b808c92320 | |
|
93a7bc5295 | |
|
1681816253 | |
|
43e1c25aab | |
|
3794cf15d7 | |
|
56e5e89fe8 | |
|
a4958aa474 | |
|
15bbb39b9e | |
|
e30dc2df28 | |
|
5618af5ed9 | |
|
a98327e7d9 | |
|
6e0f267b49 | |
|
5bf8769585 | |
|
a4ec275353 | |
|
3dadc0be06 | |
|
a0ee8d1199 | |
|
9afbc3cfc9 | |
|
64f291f3bf | |
|
363b6f9af8 | |
|
653ba7e707 | |
|
d9cfba7e8d | |
|
48364b1f65 | |
|
7e09841b4a | |
|
502f7c0638 | |
|
9048bc1a5e | |
|
2a9161077a | |
|
faa3af5bbc | |
|
a074310ec6 | |
|
ec29de0479 | |
|
2f5947392a | |
|
aa1fbd53dd | |
|
ecc85461ac | |
|
0b5c130293 | |
|
57b86c5d2e | |
|
92ccca5185 | |
|
399e932246 | |
|
578987ea97 | |
|
b1a48cd9ba | |
|
14cc3f8549 | |
|
4458f4f20d | |
|
a0ae3c378d | |
|
a5f0c41fd6 | |
|
f22d8f8b68 | |
|
b12c399fdb | |
|
baef245db6 | |
|
81e6c4d907 | |
|
a3cc1384b5 | |
|
cd81ee8cd4 | |
|
b2968af896 | |
|
22427c9659 | |
|
a9a09ba2ac | |
|
7eb24ffc69 | |
|
4a7b9856ba | |
|
fdb4200a2c | |
|
3dc2a90711 | |
|
4ed41ada27 | |
|
6fbc5740d9 | |
|
91d7e66b5a | |
|
02a17de862 | |
|
657fc37a43 | |
|
5c312bd001 | |
|
81a3058223 | |
|
40617f1c62 | |
|
f65e252d0e | |
|
8452f8216e | |
|
6759f19f83 | |
|
14d836310c | |
|
49ccb31dcc | |
|
0c7828ee55 | |
|
4ef96e19f4 | |
|
da395f8dac | |
|
3b0747c1fe | |
|
c91c4102d7 | |
|
e4cb03f9ec | |
|
5c79585e29 | |
|
3800962cb4 | |
|
4c63abd07d | |
|
1bd2c22b69 | |
|
87a2eb50a5 | |
|
0d0d59946f | |
|
5e45aa86b8 | |
|
cf9ed3f792 | |
|
80ed515206 | |
|
d192ed8bb6 |
|
@ -1,6 +1,6 @@
|
|||
organization: dapr
|
||||
defaultSticker: clmjkxscc122740fl0mkmb7egi
|
||||
defaultSticker: clrqfdv4x24910fl5n4iwu5oa
|
||||
stickers:
|
||||
-
|
||||
id: clmjkxscc122740fl0mkmb7egi
|
||||
alias: ghc2023
|
||||
id: clrqfdv4x24910fl5n4iwu5oa
|
||||
alias: sdk-badge
|
||||
|
|
|
@ -18,14 +18,13 @@ from github import Github
|
|||
|
||||
g = Github(os.getenv("GITHUB_TOKEN"))
|
||||
repo = g.get_repo(os.getenv("GITHUB_REPOSITORY"))
|
||||
maintainers = [m.strip() for m in os.getenv("MAINTAINERS").split(',')]
|
||||
|
||||
def fetch_pulls(mergeable_state):
|
||||
return [pr for pr in repo.get_pulls(state='open', sort='created') \
|
||||
if pr.mergeable_state == mergeable_state and 'auto-merge' in [l.name for l in pr.labels]]
|
||||
|
||||
def is_approved(pr):
|
||||
approvers = [r.user.login for r in pr.get_reviews() if r.state == 'APPROVED' and r.user.login in maintainers]
|
||||
approvers = [r.user.login for r in pr.get_reviews() if r.state == 'APPROVED']
|
||||
return len([a for a in approvers if repo.get_collaborator_permission(a) in ['admin', 'write']]) > 0
|
||||
|
||||
# First, find a PR that can be merged
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright 2024 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -ue
|
||||
|
||||
script_dir=$(readlink -f $(dirname $0))
|
||||
current_time=$(date +"%Y-%m-%d_%H-%M-%S")
|
||||
|
||||
# Thanks to https://ihateregex.io/expr/semver/
|
||||
SEMVER_REGEX='^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'
|
||||
|
||||
REL_VERSION=`echo $1 | sed -r 's/^[vV]?([0-9].+)$/\1/'`
|
||||
|
||||
if [ `echo $REL_VERSION | pcre2grep "$SEMVER_REGEX"` ]; then
|
||||
echo "$REL_VERSION is a valid semantic version."
|
||||
else
|
||||
echo "$REL_VERSION is not a valid semantic version."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAJOR_MINOR_VERSION=`echo ${REL_VERSION}- | cut -d- -f1 | cut -d. -f1,2`
|
||||
MAJOR_MINOR_PATCH_VERSION=`echo ${REL_VERSION}- | cut -d- -f1 | cut -d. -f1,2,3`
|
||||
VARIANT=`echo ${REL_VERSION}- | cut -d- -f2`
|
||||
|
||||
if [ "$VARIANT" = "SNAPSHOT" ]; then
|
||||
echo "SNAPSHOT release detected, updating version in master branch to $REL_VERSION ..."
|
||||
if [ "$REL_VERSION" != "${MAJOR_MINOR_PATCH_VERSION}-SNAPSHOT" ]; then
|
||||
echo "Invalid snapshot version: $REL_VERSION"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
# Change is done directly in the master branch.
|
||||
${script_dir}/update_sdk_version.sh $REL_VERSION
|
||||
git commit -s -m "Update master version to ${REL_VERSION}" -a
|
||||
git clean -f -d
|
||||
git push origin master
|
||||
echo "Updated master branch with version ${REL_VERSION}."
|
||||
exit 0
|
||||
elif [ "$VARIANT" = "rc" ]; then
|
||||
echo "Release-candidate version detected: $REL_VERSION"
|
||||
RC_COUNT=`echo ${REL_VERSION}- | cut -d- -f3`
|
||||
if ! ((10#${RC_COUNT} >= 0)) 2>/dev/null || [ "$RC_COUNT" == "" ]; then
|
||||
echo "Invalid release-candidate count: $RC_COUNT"
|
||||
exit 3
|
||||
fi
|
||||
if [ "$REL_VERSION" != "${MAJOR_MINOR_PATCH_VERSION}-rc-${RC_COUNT}" ]; then
|
||||
echo "Invalid release-candidate version: $REL_VERSION"
|
||||
exit 3
|
||||
fi
|
||||
elif [ "$VARIANT" = "" ]; then
|
||||
echo "Release version detected: $REL_VERSION"
|
||||
else
|
||||
echo "Invalid release variant: $VARIANT"
|
||||
exit 3
|
||||
fi
|
||||
|
||||
echo "Passed all version format validations."
|
||||
|
||||
RELEASE_BRANCH="release-$MAJOR_MINOR_VERSION"
|
||||
RELEASE_TAG="v$REL_VERSION"
|
||||
|
||||
if [ `git rev-parse --verify origin/$RELEASE_BRANCH 2>/dev/null` ]; then
|
||||
echo "$RELEASE_BRANCH branch already exists, checking it out ..."
|
||||
git checkout $RELEASE_BRANCH
|
||||
else
|
||||
echo "$RELEASE_BRANCH does not exist, creating ..."
|
||||
git checkout -b $RELEASE_BRANCH
|
||||
git push origin $RELEASE_BRANCH
|
||||
fi
|
||||
echo "$RELEASE_BRANCH branch is ready."
|
||||
|
||||
if [ `git rev-parse --verify $RELEASE_TAG 2>/dev/null` ]; then
|
||||
echo "$RELEASE_TAG tag already exists, checking it out ..."
|
||||
git checkout $RELEASE_TAG
|
||||
else
|
||||
${script_dir}/update_sdk_version.sh $REL_VERSION
|
||||
git commit -s -m "Release $REL_VERSION" -a
|
||||
if [ "$VARIANT" = "" ]; then
|
||||
echo "Generating docs ..."
|
||||
${script_dir}/update_docs.sh $REL_VERSION
|
||||
git commit -s -m "Generate updated javadocs for $REL_VERSION" -a
|
||||
fi
|
||||
git push origin $RELEASE_BRANCH
|
||||
|
||||
echo "Tagging $RELEASE_TAG ..."
|
||||
git tag $RELEASE_TAG
|
||||
echo "$RELEASE_TAG is tagged."
|
||||
|
||||
echo "Pushing $RELEASE_TAG tag ..."
|
||||
git push origin $RELEASE_TAG
|
||||
echo "$RELEASE_TAG tag is pushed."
|
||||
fi
|
||||
|
||||
if [ "$VARIANT" = "" ]; then
|
||||
git clean -xdf
|
||||
echo "Updating docs in master branch ..."
|
||||
git checkout master
|
||||
git fetch origin
|
||||
git reset --hard origin/master
|
||||
git cherry-pick --strategy=recursive -X theirs $RELEASE_TAG
|
||||
git push origin master
|
||||
echo "Updated docs in master branch."
|
||||
fi
|
||||
|
||||
echo "Done."
|
|
@ -4,20 +4,28 @@ set -uex
|
|||
|
||||
DAPR_JAVA_SDK_VERSION=$1
|
||||
|
||||
# Alpha artifacts of the sdk tracks the regular SDK minor and patch versions, just not the major.
|
||||
# Replaces the SDK major version to 0 for alpha artifacts.
|
||||
DAPR_JAVA_SDK_ALPHA_VERSION=`echo $DAPR_JAVA_SDK_VERSION | sed 's/^[0-9]*\./0./'`
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
sed -i bak "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" README.md
|
||||
sed -i bak "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" README.md
|
||||
sed -i bak "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/_index.md
|
||||
sed -i bak "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" daprdocs/content/en/java-sdk-docs/_index.md
|
||||
sed -i bak "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_ALPHA_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/spring-boot/_index.md
|
||||
rm README.mdbak
|
||||
else
|
||||
sed -i "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" README.md
|
||||
sed -i "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" README.md
|
||||
sed -i "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/_index.md
|
||||
sed -i "s/compile('io.dapr:\(.*\):.*')/compile('io.dapr:\\1:${DAPR_JAVA_SDK_VERSION}')/g" daprdocs/content/en/java-sdk-docs/_index.md
|
||||
sed -i "s/<version>.*<\/version>\$/<version>${DAPR_JAVA_SDK_ALPHA_VERSION}<\/version>/g" daprdocs/content/en/java-sdk-docs/spring-boot/_index.md
|
||||
fi
|
||||
|
||||
rm -rf docs
|
||||
mvn -Dmaven.test.skip=false -Djacoco.skip=true clean install
|
||||
mvn site-deploy
|
||||
rm -f daprdocs/content/en/java-sdk-docs/_index.mdbak || echo
|
||||
rm -f daprdocs/content/en/java-sdk-docs/spring-boot/_index.md/_index.mdbak || echo
|
||||
|
||||
rm -rf docs
|
||||
./mvnw -Dmaven.test.skip=true -Djacoco.skip=true clean install
|
||||
./mvnw -Dmaven.test.skip=true -Djacoco.skip=true site-deploy
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -uex
|
||||
|
||||
DAPR_JAVA_SDK_VERSION=$1
|
||||
|
||||
# Alpha artifacts of the sdk tracks the regular SDK minor and patch versions, just not the major.
|
||||
# Replaces the SDK major version to 0 for alpha artifacts.
|
||||
DAPR_JAVA_SDK_ALPHA_VERSION=`echo $DAPR_JAVA_SDK_VERSION | sed 's/^[0-9]*\./0./'`
|
||||
|
||||
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_VERSION
|
||||
mvn versions:set-property -Dproperty=dapr.sdk.alpha.version -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION
|
||||
mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION
|
||||
mvn versions:set-property -Dproperty=dapr.sdk.version -DnewVersion=$DAPR_JAVA_SDK_VERSION -f sdk-tests/pom.xml
|
||||
mvn versions:set-property -Dproperty=dapr.sdk.alpha.version -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f sdk-tests/pom.xml
|
||||
|
||||
###################
|
||||
# Alpha artifacts #
|
||||
###################
|
||||
|
||||
# sdk-workflows
|
||||
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f sdk-workflows/pom.xml
|
||||
|
||||
# testcontainers-dapr
|
||||
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f testcontainers-dapr/pom.xml
|
||||
|
||||
# dapr-spring
|
||||
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f dapr-spring/pom.xml
|
||||
|
||||
# spring-boot-examples
|
||||
mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f spring-boot-examples/pom.xml
|
||||
|
||||
git clean -f
|
|
@ -22,11 +22,10 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: pip install PyGithub
|
||||
- name: Automerge and update
|
||||
env:
|
||||
MAINTAINERS: artursouza,mukundansundar
|
||||
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
|
||||
run: python ./.github/scripts/automerge.py
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
@ -15,27 +16,21 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
name: "Build jdk:${{ matrix.java }} sb:${{ matrix.spring-boot-version }} exp:${{ matrix.experimental }}"
|
||||
name: "Build jdk:${{ matrix.java }} sb:${{ matrix.spring-boot-display-version }} exp:${{ matrix.experimental }}"
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
continue-on-error: ${{ matrix.experimental }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java: [ 11, 13, 15, 16 ]
|
||||
spring-boot-version: [ 2.7.8 ]
|
||||
java: [ 17 ]
|
||||
spring-boot-version: [ 3.4.3 ]
|
||||
spring-boot-display-version: [ 3.4.x ]
|
||||
experimental: [ false ]
|
||||
include:
|
||||
- java: 11
|
||||
spring-boot-version: 2.6.14
|
||||
experimental: false
|
||||
- java: 11
|
||||
spring-boot-version: 2.5.7
|
||||
experimental: false
|
||||
- java: 11
|
||||
spring-boot-version: 2.4.0
|
||||
experimental: false
|
||||
- java: 11
|
||||
spring-boot-version: 2.3.6.RELEASE
|
||||
- java: 17
|
||||
spring-boot-version: 3.3.9
|
||||
spring-boot-display-version: 3.3.x
|
||||
experimental: false
|
||||
env:
|
||||
GOVER: "1.20"
|
||||
|
@ -43,35 +38,40 @@ jobs:
|
|||
GOARCH: amd64
|
||||
GOPROXY: https://proxy.golang.org
|
||||
JDK_VER: ${{ matrix.java }}
|
||||
DAPR_CLI_VER: 1.12.0-rc.1
|
||||
DAPR_RUNTIME_VER: 1.12.0-rc.5
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.12.0-rc.1/install/install.sh
|
||||
DAPR_CLI_VER: 1.15.0
|
||||
DAPR_RUNTIME_VER: 1.15.4
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.15.0/install/install.sh
|
||||
DAPR_CLI_REF:
|
||||
DAPR_REF:
|
||||
TOXIPROXY_URL: https://github.com/Shopify/toxiproxy/releases/download/v2.5.0/toxiproxy-server-linux-amd64
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Stable Docker
|
||||
id: setup_docker
|
||||
uses: docker/setup-docker-action@v4
|
||||
- name: Check Docker version
|
||||
run: docker version
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up OpenJDK ${{ env.JDK_VER }}
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ env.JDK_VER }}
|
||||
- name: Set up Dapr CLI
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
if: env.DAPR_REF != '' || env.DAPR_CLI_REF != ''
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Checkout Dapr CLI repo to override dapr command.
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: env.DAPR_CLI_REF != ''
|
||||
with:
|
||||
repository: dapr/cli
|
||||
ref: ${{ env.DAPR_CLI_REF }}
|
||||
path: cli
|
||||
- name: Checkout Dapr repo to override daprd.
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: env.DAPR_REF != ''
|
||||
with:
|
||||
repository: dapr/dapr
|
||||
|
@ -104,7 +104,7 @@ jobs:
|
|||
./dist/linux_amd64/release/placement &
|
||||
- name: Spin local environment
|
||||
run: |
|
||||
docker-compose -f ./sdk-tests/deploy/local-test.yml up -d mongo kafka
|
||||
docker compose -f ./sdk-tests/deploy/local-test.yml up -d mongo kafka
|
||||
docker ps
|
||||
- name: Install local ToxiProxy to simulate connectivity issues to Dapr sidecar
|
||||
run: |
|
||||
|
@ -113,60 +113,65 @@ jobs:
|
|||
chmod +x /home/runner/.local/bin/toxiproxy-server
|
||||
/home/runner/.local/bin/toxiproxy-server --version
|
||||
- name: Clean up files
|
||||
run: mvn clean -B
|
||||
run: ./mvnw clean -B
|
||||
- name: Build sdk
|
||||
run: mvn compile -B -q
|
||||
run: ./mvnw compile -B -q
|
||||
- name: Unit tests
|
||||
run: mvn -B test -q
|
||||
run: ./mvnw test # making it temporarily verbose.
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v3.1.4
|
||||
uses: codecov/codecov-action@v5.4.3
|
||||
- name: Install jars
|
||||
run: mvn install -q -B -DskipTests
|
||||
run: ./mvnw install -q -B -DskipTests
|
||||
- name: Integration tests using spring boot version ${{ matrix.spring-boot-version }}
|
||||
id: integration_tests
|
||||
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} mvn -B -f sdk-tests/pom.xml verify
|
||||
run: PRODUCT_SPRING_BOOT_VERSION=${{ matrix.spring-boot-version }} ./mvnw -B -Pintegration-tests verify
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Upload test report for sdk
|
||||
uses: actions/upload-artifact@master
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: report-dapr-java-sdk
|
||||
name: report-dapr-java-sdk-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
|
||||
path: sdk/target/jacoco-report/
|
||||
- name: Upload test report for sdk-actors
|
||||
uses: actions/upload-artifact@master
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: report-dapr-java-sdk-actors
|
||||
name: report-dapr-java-sdk-actors-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
|
||||
path: sdk-actors/target/jacoco-report/
|
||||
- name: Upload failsafe test report for sdk-tests on failure
|
||||
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
|
||||
uses: actions/upload-artifact@master
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: failsafe-report-sdk-tests
|
||||
name: failsafe-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
|
||||
path: sdk-tests/target/failsafe-reports
|
||||
- name: Upload surefire test report for sdk-tests on failure
|
||||
if: ${{ failure() && steps.integration_tests.conclusion == 'failure' }}
|
||||
uses: actions/upload-artifact@master
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: surefire-report-sdk-tests
|
||||
name: surefire-report-sdk-tests-jdk${{ matrix.java }}-sb${{ matrix.spring-boot-version }}
|
||||
path: sdk-tests/target/surefire-reports
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
JDK_VER: 11
|
||||
JDK_VER: 17
|
||||
OSSRH_USER_TOKEN: ${{ secrets.OSSRH_USER_TOKEN }}
|
||||
OSSRH_PWD_TOKEN: ${{ secrets.OSSRH_PWD_TOKEN }}
|
||||
GPG_KEY: ${{ secrets.GPG_KEY }}
|
||||
GPG_PWD: ${{ secrets.GPG_PWD }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up OpenJDK ${{ env.JDK_VER }}
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ env.JDK_VER }}
|
||||
- name: Get pom parent version
|
||||
run: |
|
||||
PARENT_VERSION=$(mvn -B -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
|
||||
PARENT_VERSION=$(./mvnw -B -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
|
||||
echo "PARENT_VERSION=$PARENT_VERSION" >> $GITHUB_ENV
|
||||
- name: Is SNAPSHOT release ?
|
||||
if: contains(github.ref, 'master') && contains(env.PARENT_VERSION, '-SNAPSHOT')
|
||||
|
@ -178,11 +183,11 @@ jobs:
|
|||
echo "DEPLOY_OSSRH=true" >> $GITHUB_ENV
|
||||
- name: Install jars
|
||||
if: env.DEPLOY_OSSRH == 'true'
|
||||
run: mvn clean install -B -q
|
||||
run: ./mvnw install -DskipTests -B -q
|
||||
- name: Publish to ossrh
|
||||
if: env.DEPLOY_OSSRH == 'true'
|
||||
run: |
|
||||
echo ${{ secrets.GPG_PRIVATE_KEY }} | base64 -d > private-key.gpg
|
||||
export GPG_TTY=$(tty)
|
||||
gpg --batch --import private-key.gpg
|
||||
mvn -V -B -Dgpg.skip=false -s settings.xml deploy -pl \!examples
|
||||
./mvnw -V -B -Dgpg.skip=false -s settings.xml deploy
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
#
|
||||
# Copyright 2024 The Dapr Authors
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name: Create a release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
rel_version:
|
||||
description: 'Release version (examples: 1.9.0-rc-1, 1.9.1, 1.11.0-SNAPSHOT)'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
name: Creates release branch and tag
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
JDK_VER: '17'
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.DAPR_BOT_TOKEN }}
|
||||
persist-credentials: false
|
||||
- name: Set up OpenJDK ${{ env.JDK_VER }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ env.JDK_VER }}
|
||||
- name: Install required packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install pcre2-utils
|
||||
- name: Create release branch and tag
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
|
||||
run: |
|
||||
git config user.email "daprweb@microsoft.com"
|
||||
git config user.name "Dapr Bot"
|
||||
# Update origin with token
|
||||
git remote set-url origin https://x-access-token:${{ secrets.DAPR_BOT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
|
||||
# Copy first to allow automation to use the latest version and not the release branch's version.
|
||||
cp -R ./.github/scripts ${RUNNER_TEMP}/
|
||||
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
|
|
@ -9,7 +9,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Comment analyzer
|
||||
uses: actions/github-script@v6
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{secrets.DAPR_BOT_TOKEN}}
|
||||
script: |
|
||||
|
|
|
@ -32,15 +32,15 @@ jobs:
|
|||
FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed.
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: "Run FOSSA Scan"
|
||||
uses: fossas/fossa-action@v1.3.1 # Use a specific version if locking is preferred
|
||||
uses: fossas/fossa-action@v1.7.0 # Use a specific version if locking is preferred
|
||||
with:
|
||||
api-key: ${{ env.FOSSA_API_KEY }}
|
||||
|
||||
- name: "Run FOSSA Test"
|
||||
uses: fossas/fossa-action@v1.3.1 # Use a specific version if locking is preferred
|
||||
uses: fossas/fossa-action@v1.7.0 # Use a specific version if locking is preferred
|
||||
with:
|
||||
api-key: ${{ env.FOSSA_API_KEY }}
|
||||
run-tests: true
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
name: Validate Javadocs Generation
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
tags:
|
||||
- v*
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- release-*
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Validate Javadocs generation"
|
||||
runs-on: linux-arm64-latest-4-cores
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
JDK_VER: 17
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up OpenJDK ${{ env.JDK_VER }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ env.JDK_VER }}
|
||||
- name: Install jars
|
||||
run: ./mvnw install -q -B -DskipTests
|
||||
- name: Validate Java docs generation
|
||||
run: ./mvnw site-deploy
|
|
@ -30,41 +30,46 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false # Keep running if one leg fails.
|
||||
matrix:
|
||||
java: [ 11, 13, 15, 16 ]
|
||||
java: [ 17 ]
|
||||
env:
|
||||
GOVER: "1.20"
|
||||
GOOS: linux
|
||||
GOARCH: amd64
|
||||
GOPROXY: https://proxy.golang.org
|
||||
JDK_VER: ${{ matrix.java }}
|
||||
DAPR_CLI_VER: 1.12.0-rc.1
|
||||
DAPR_RUNTIME_VER: 1.12.0-rc.5
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.12.0-rc.1/install/install.sh
|
||||
DAPR_CLI_VER: 1.15.0
|
||||
DAPR_RUNTIME_VER: 1.15.4
|
||||
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/v1.15.0/install/install.sh
|
||||
DAPR_CLI_REF:
|
||||
DAPR_REF:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up OpenJDK ${{ env.JDK_VER }}
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ env.JDK_VER }}
|
||||
- name: Install Stable Docker
|
||||
id: setup_docker
|
||||
uses: docker/setup-docker-action@v4
|
||||
- name: Check Docker version
|
||||
run: docker version
|
||||
- name: Set up Dapr CLI
|
||||
run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }}
|
||||
- name: Set up Go ${{ env.GOVER }}
|
||||
if: env.DAPR_REF != '' || env.DAPR_CLI_REF != ''
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GOVER }}
|
||||
- name: Checkout Dapr CLI repo to override dapr command.
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: env.DAPR_CLI_REF != ''
|
||||
with:
|
||||
repository: dapr/cli
|
||||
ref: ${{ env.DAPR_CLI_REF }}
|
||||
path: cli
|
||||
- name: Checkout Dapr repo to override daprd.
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
if: env.DAPR_REF != ''
|
||||
with:
|
||||
repository: dapr/dapr
|
||||
|
@ -100,65 +105,121 @@ jobs:
|
|||
echo "PATH=$PATH:$HOME/.local/bin" >> $GITHUB_ENV
|
||||
pip3 install setuptools wheel
|
||||
pip3 install mechanical-markdown
|
||||
- name: Install Local mongo database using docker-compose
|
||||
run: |
|
||||
docker-compose -f ./sdk-tests/deploy/local-test.yml up -d mongo
|
||||
docker ps
|
||||
- name: Verify scheduler is listening on port.
|
||||
run: sleep 30 && docker logs dapr_scheduler && nc -vz localhost 50006
|
||||
- name: Clean up files
|
||||
run: mvn clean
|
||||
run: ./mvnw clean
|
||||
- name: Build sdk
|
||||
run: mvn compile -q
|
||||
run: ./mvnw compile -q
|
||||
- name: Install jars
|
||||
run: mvn install -q
|
||||
run: ./mvnw install -q
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate Jobs example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/jobs/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate conversation ai example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/conversation/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate invoke http example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/invoke/http/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate invoke grpc example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/invoke/grpc/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate tracing example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/tracing/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate expection handling example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/exception/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate state example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/state/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate pubsub example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/pubsub/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate bindings HTTP example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/bindings/http/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate secrets example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/secrets/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate unit testing example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/unittesting/README.md
|
||||
- name: Validate Configuration gRPC API example
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate Configuration API example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/configuration/grpc/README.md
|
||||
- name: Validate Configuration HTTP API example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/configuration/http/README.md
|
||||
mm.py ./src/main/java/io/dapr/examples/configuration/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate actors example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/actors/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate query state HTTP example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/querystate/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate workflows example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/workflows/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate streaming subscription example
|
||||
working-directory: ./examples
|
||||
run: |
|
||||
mm.py ./src/main/java/io/dapr/examples/pubsub/stream/README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate Spring Boot examples
|
||||
working-directory: ./spring-boot-examples
|
||||
run: |
|
||||
mm.py README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
- name: Validate Spring Boot Workflow examples
|
||||
working-directory: ./spring-boot-examples/workflows
|
||||
run: |
|
||||
mm.py README.md
|
||||
env:
|
||||
DOCKER_HOST: ${{steps.setup_docker.outputs.sock}}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
.run/
|
||||
.vs/
|
||||
.vscode/
|
||||
.devcontainer/
|
||||
|
||||
# Output folders
|
||||
**/target/
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
wrapperVersion=3.3.2
|
||||
distributionType=script
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
|
||||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar
|
|
@ -1,3 +1,4 @@
|
|||
# Enable auto-env through the sdkman_auto_env config
|
||||
# Add key=value pairs of SDKs to use below
|
||||
java=11.0.19-tem
|
||||
java=17.0.11-tem
|
||||
maven=3.8.5
|
|
@ -12,6 +12,8 @@ This project has adopted the [Contributor Covenant Code of Conduct](https://gith
|
|||
|
||||
Contributions come in many forms: submitting issues, writing code, participating in discussions and community calls.
|
||||
|
||||
To learn more about becoming a contributor and the different roles within the Dapr community (Contributor, Approver, Maintainer), please refer to our [Community Membership](https://github.com/dapr/community/blob/master/community-membership.md) documentation.
|
||||
|
||||
This document provides the guidelines for how to contribute to the Dapr project.
|
||||
|
||||
## Issues
|
||||
|
@ -49,18 +51,77 @@ Before you file an issue, make sure you've checked the following:
|
|||
|
||||
This section describes the guidelines for contributing code / docs to Dapr.
|
||||
|
||||
### Things to consider when adding new API to SDK
|
||||
|
||||
1. All the new API's go under [dapr-sdk maven package](https://github.com/dapr/java-sdk/tree/master/sdk)
|
||||
2. Make sure there is an example talking about how to use the API along with a README with mechanical markdown. [Example](https://github.com/dapr/java-sdk/pull/1235/files#diff-69ed756c4c01fd5fa884aac030dccb8f3f4d4fefa0dc330862d55a6f87b34a14)
|
||||
|
||||
#### Mechanical Markdown
|
||||
|
||||
Mechanical markdown is used to validate example outputs in our CI pipeline. It ensures that the expected output in README files matches the actual output when running the examples. This helps maintain example output, catches any unintended changes in example behavior, and regressions.
|
||||
|
||||
To test mechanical markdown locally:
|
||||
|
||||
1. Install the package:
|
||||
```bash
|
||||
pip3 install mechanical-markdown
|
||||
```
|
||||
|
||||
2. Run the test from the respective examples README directory, for example:
|
||||
```bash
|
||||
cd examples
|
||||
mm.py ./src/main/java/io/dapr/examples/workflows/README.md
|
||||
```
|
||||
|
||||
The test will:
|
||||
- Parse the STEP markers in the README
|
||||
- Execute the commands specified in the markers
|
||||
- Compare the actual output with the expected output
|
||||
- Report any mismatches
|
||||
|
||||
When writing STEP markers:
|
||||
- Use `output_match_mode: substring` for flexible matching
|
||||
- Quote strings containing special YAML characters (like `:`, `*`, `'`)
|
||||
- Set appropriate timeouts for long-running examples
|
||||
|
||||
Example STEP marker:
|
||||
```yaml
|
||||
<!-- STEP
|
||||
name: Run example
|
||||
output_match_mode: substring
|
||||
expected_stdout_lines:
|
||||
- "Starting workflow: io.dapr.examples.workflows.compensation.BookTripWorkflow"
|
||||
...
|
||||
background: true
|
||||
timeout_seconds: 60
|
||||
-->
|
||||
```
|
||||
|
||||
### Pull Requests
|
||||
|
||||
All contributions come through pull requests. To submit a proposed change, we recommend following this workflow:
|
||||
|
||||
1. Make sure there's an issue (bug or proposal) raised, which sets the expectations for the contribution you are about to make.
|
||||
1. Fork the relevant repo and create a new branch
|
||||
1. Create your change
|
||||
2. Fork the relevant repo and create a new branch
|
||||
3. Create your change
|
||||
- Code changes require tests
|
||||
1. Update relevant documentation for the change
|
||||
1. Commit and open a PR
|
||||
1. Wait for the CI process to finish and make sure all checks are green
|
||||
1. A maintainer of the project will be assigned, and you can expect a review within a few days
|
||||
4. Update relevant documentation for the change
|
||||
5. Check the code style
|
||||
6. Commit and open a PR
|
||||
7. Wait for the CI process to finish and make sure all checks are green
|
||||
8. A maintainer of the project will be assigned, and you can expect a review within a few days
|
||||
9. All the files have the Copyright header.
|
||||
|
||||
### Configure the code style with checkstyle
|
||||
|
||||
The project contains a checkstyle file (`checkstyle.xml`) that must be used for formatting the code.
|
||||
|
||||
* IntelliJ IDEA
|
||||
You can use [CheckStyle-IDEA plugin](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea).
|
||||
* VSCode
|
||||
You can use [Checkstyle for Java](https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle).
|
||||
* Eclipse
|
||||
You can use [Eclipse Checkstyle Plugin](https://checkstyle.org/eclipse-cs/#!/)
|
||||
|
||||
#### Use work-in-progress PRs for early feedback
|
||||
|
||||
|
@ -120,6 +181,10 @@ A non-exclusive list of code that must be places in `vendor/`:
|
|||
|
||||
**Thank You!** - Your contributions to open source, large or small, make projects like this possible. Thank you for taking the time to contribute.
|
||||
|
||||
## Github Dapr Bot Commands
|
||||
|
||||
Checkout the [daprbot documentation](https://docs.dapr.io/contributing/daprbot/) for Github commands you can run in this repo for common tasks. For example, you can run the `/assign` (as a comment on an issue) to assign the issue to yourself.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project has adopted the [Contributor Covenant Code of Conduct](https://github.com/dapr/community/blob/master/CODE-OF-CONDUCT.md)
|
||||
|
|
74
README.md
|
@ -1,11 +1,6 @@
|
|||
# Dapr SDK for Java
|
||||
|
||||
[](https://github.com/dapr/java-sdk/actions?workflow=Build)
|
||||
[](https://discord.com/channels/778680217417809931/778749797242765342)
|
||||
[](https://codecov.io/gh/dapr/java-sdk)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
[](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fdapr%2Fjava-sdk?ref=badge_shield)
|
||||
[](https://search.maven.org/search?q=g:%22io.dapr%22%20AND%20a:%22dapr-sdk%22)
|
||||
[](https://central.sonatype.com/artifact/io.dapr/dapr-sdk) [](https://github.com/dapr/java-sdk/actions/workflows/build.yml) [](https://codecov.io/gh/dapr/java-sdk) [](https://github.com/dapr/java-sdk/blob/master/LICENSE) [](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fdapr%2Fjava-sdk?ref=badge_shield) [](https://github.com/dapr/java-sdk/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) [](http://bit.ly/dapr-discord) [](https://youtube.com/@daprdev) [](https://twitter.com/daprdev)
|
||||
|
||||
This is the Dapr SDK for Java, including the following features:
|
||||
|
||||
|
@ -14,6 +9,7 @@ This is the Dapr SDK for Java, including the following features:
|
|||
* Binding
|
||||
* State Store
|
||||
* Actors
|
||||
* Workflows
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
@ -37,6 +33,7 @@ This is the Dapr SDK for Java, including the following features:
|
|||
* An existing Java Maven or Gradle project. You may also start a new project via one of the options below:
|
||||
* [New Maven project in IntelliJ](https://www.jetbrains.com/help/idea/maven-support.html#create_new_maven_project)
|
||||
* [Maven in 5 minutes](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)
|
||||
* [Install toxiproxy-server binary](https://github.com/Shopify/toxiproxy/releases)
|
||||
|
||||
### Install JDK
|
||||
|
||||
|
@ -53,19 +50,19 @@ For a Maven project, add the following to your `pom.xml` file:
|
|||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.14.1</version>
|
||||
</dependency>
|
||||
<!-- Dapr's SDK for Actors (optional). -->
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-actors</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.14.1</version>
|
||||
</dependency>
|
||||
<!-- Dapr's SDK integration with SpringBoot (optional). -->
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-springboot</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.14.1</version>
|
||||
</dependency>
|
||||
...
|
||||
</dependencies>
|
||||
|
@ -79,11 +76,11 @@ For a Gradle project, add the following to your `build.gradle` file:
|
|||
dependencies {
|
||||
...
|
||||
// Dapr's core SDK with all features, except Actors.
|
||||
compile('io.dapr:dapr-sdk:1.9.0')
|
||||
compile('io.dapr:dapr-sdk:1.14.1')
|
||||
// Dapr's SDK for Actors (optional).
|
||||
compile('io.dapr:dapr-sdk-actors:1.9.0')
|
||||
compile('io.dapr:dapr-sdk-actors:1.14.1')
|
||||
// Dapr's SDK integration with SpringBoot (optional).
|
||||
compile('io.dapr:dapr-sdk-springboot:1.9.0')
|
||||
compile('io.dapr:dapr-sdk-springboot:1.14.1')
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -98,7 +95,7 @@ Then head over to build the [Maven](https://maven.apache.org/install.html) (Apac
|
|||
|
||||
```sh
|
||||
# make sure you are in the `java-sdk` directory.
|
||||
mvn clean install
|
||||
./mvnw clean install
|
||||
```
|
||||
|
||||
Try the following examples to learn more about Dapr's Java SDK:
|
||||
|
@ -106,20 +103,30 @@ Try the following examples to learn more about Dapr's Java SDK:
|
|||
* [Invoking a Grpc service](./examples/src/main/java/io/dapr/examples/invoke/grpc)
|
||||
* [State management](./examples/src/main/java/io/dapr/examples/state)
|
||||
* [PubSub with subscriber](./examples/src/main/java/io/dapr/examples/pubsub/)
|
||||
* [PubSub with streaming subscription](./examples/src/main/java/io/dapr/examples/pubsub/stream/)
|
||||
* [Binding with input over Http](./examples/src/main/java/io/dapr/examples/bindings/http)
|
||||
* [Actors](./examples/src/main/java/io/dapr/examples/actors/)
|
||||
* [Workflows](./examples/src/main/java/io/dapr/examples/workflows/)
|
||||
* [Secrets management](./examples/src/main/java/io/dapr/examples/secrets)
|
||||
* [Configuration](./examples/src/main/java/io/dapr/examples/configuration)
|
||||
* [Distributed tracing with OpenTelemetry SDK](./examples/src/main/java/io/dapr/examples/tracing)
|
||||
* [Exception handling](./examples/src/main/java/io/dapr/examples/exception)
|
||||
* [Unit testing](./examples/src/main/java/io/dapr/examples/unittesting)
|
||||
|
||||
### Running Spring Boot examples
|
||||
|
||||
The Spring Boot integration for Dapr use [Testcontainers](https://testcontainers.com) to set up a local environment development flow that doesn't
|
||||
require the use of the `dapr` CLI and it integrates with the Spring Boot programming model.
|
||||
|
||||
You can find a [step-by-step tutorial showing this integration here](./spring-boot-examples/README.md).
|
||||
|
||||
### API Documentation
|
||||
|
||||
Please, refer to our [Javadoc](https://dapr.github.io/java-sdk/) website.
|
||||
|
||||
### Reactor API
|
||||
|
||||
The Java SDK for Dapr is built using [Project Reactor](https://projectreactor.io/). It provides an asynchronous API for Java. When consuming a result is consumed synchronously, as in the examples referenced above, the `block()` method is used.
|
||||
The Java SDK for Dapr is built using [Project Reactor](https://projectreactor.io/). It provides an asynchronous API for Java. A result is consumed synchronously by using the `block()` method, as shown in the examples referenced above.
|
||||
|
||||
The code below does not make any API call, it simply returns the [Mono](https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html) publisher object. Nothing happens until the application subscribes or blocks on the result:
|
||||
|
||||
|
@ -127,7 +134,7 @@ The code below does not make any API call, it simply returns the [Mono](https://
|
|||
Mono<Void> result = daprClient.publishEvent("mytopic", "my message");
|
||||
```
|
||||
|
||||
To start execution and receive the result object synchronously(`void` or `Void` becomes an empty result), use `block()`. The code below shows how to execute the call and consume an empty response:
|
||||
To start execution and receive the result object synchronously (`void` or `Void` becomes an empty result), use `block()`. The code below shows how to execute the call and consume an empty response:
|
||||
```java
|
||||
Mono<Void> result = daprClient.publishEvent("mytopic", "my message");
|
||||
result.block();
|
||||
|
@ -135,9 +142,9 @@ result.block();
|
|||
|
||||
### How to use a custom serializer
|
||||
|
||||
This SDK provides a basic serialization for request/response objects but also for state objects. Applications should provide their own serialization for production scenarios.
|
||||
This SDK provides a basic serialization for request/response objects, and state objects. Applications should provide their own serialization for production scenarios.
|
||||
|
||||
1. Implement the [DaprObjectSerializer](https://dapr.github.io/java-sdk/io/dapr/serializer/DaprObjectSerializer.html) interface. See [this class](sdk-actors/src/test/java/io/dapr/actors/runtime/JavaSerializer.java) as example.
|
||||
1. Implement the [DaprObjectSerializer](https://dapr.github.io/java-sdk/io/dapr/serializer/DaprObjectSerializer.html) interface. See [this class](sdk-actors/src/test/java/io/dapr/actors/runtime/JavaSerializer.java) as an example.
|
||||
2. Use your serializer class in the following scenarios:
|
||||
* When building a new instance of [DaprClient](https://dapr.github.io/java-sdk/io/dapr/client/DaprClient.html):
|
||||
```java
|
||||
|
@ -163,13 +170,13 @@ This SDK provides a basic serialization for request/response objects but also fo
|
|||
```
|
||||
|
||||
|
||||
### Debug Java application or Dapr's Java SDK
|
||||
### Debug a Java application or Dapr's Java SDK
|
||||
|
||||
**In IntelliJ Community Edition, consider [debugging in IntelliJ](https://docs.dapr.io/developing-applications/ides/intellij/).**
|
||||
**In IntelliJ Community Edition, consider [debugging in IntelliJ](https://docs.dapr.io/developing-applications/local-development/ides/intellij/).**
|
||||
|
||||
**In Visual Studio Code, consider [debugging in Visual Studio Code](https://docs.dapr.io/developing-applications/ides/vscode-debugging/).**
|
||||
**In Visual Studio Code, consider [debugging in Visual Studio Code](https://docs.dapr.io/developing-applications/local-development/ides/vscode/).**
|
||||
|
||||
If you need to debug your Application, run Dapr sidecar separately and then start the application from your IDE (IntelliJ, for example).
|
||||
If you need to debug your Application, run the Dapr sidecar separately, and then start the application from your IDE (IntelliJ or Eclipse, for example).
|
||||
For Linux and MacOS:
|
||||
|
||||
```sh
|
||||
|
@ -178,24 +185,25 @@ dapr run --app-id testapp --app-port 3000 --dapr-http-port 3500 --dapr-grpc-port
|
|||
|
||||
> Note: confirm the correct port that the app will listen to and that the Dapr ports above are free, changing the ports if necessary.
|
||||
|
||||
When running your Java application from IDE, make sure the following environment variables are set, so the Java SDK knows how to connect to Dapr's sidecar:
|
||||
When running your Java application from your IDE, make sure the following environment variables are set, so the Java SDK knows how to connect to Dapr's sidecar:
|
||||
```
|
||||
DAPR_HTTP_PORT=3500
|
||||
DAPR_GRPC_PORT=5001
|
||||
```
|
||||
|
||||
Now you can go to your IDE (like Eclipse, for example) and debug your Java application, using port `3500` to call Dapr while also listening to port `3000` to expose Dapr's callback endpoint.
|
||||
Now you can go to your IDE and debug your Java application, using port `3500` to call Dapr while also listening to port `3000` to expose Dapr's callback endpoint.
|
||||
|
||||
### Exception handling
|
||||
|
||||
Most exceptions thrown from the SDK are instances of `DaprException`. `DaprException` extends from `RuntimeException`, making it compatible with Project Reactor. See [example](./examples/src/main/java/io/dapr/examples/exception) for more details.
|
||||
Most exceptions thrown from the SDK are instances of `DaprException`. `DaprException` extends from `RuntimeException`, making it compatible with Project Reactor. See the [exception example](./examples/src/main/java/io/dapr/examples/exception) for more details.
|
||||
|
||||
## Development
|
||||
|
||||
### Update URL to fetch proto files
|
||||
|
||||
Change the `dapr.proto.baseurl` property below in [pom.xml](./pom.xml) to point to the URL for the desired commit hash in Git if you need to target a proto file that is not been merged into master yet.
|
||||
Note: You may need to run `mvn clean` after changing this setting to remove any auto-generated files so that the new proto files get downloaded and compiled.
|
||||
|
||||
Note: You may need to run `./mvnw clean` after changing this setting to remove any auto-generated files so that the new proto files get downloaded and compiled.
|
||||
|
||||
```xml
|
||||
<project>
|
||||
|
@ -212,11 +220,10 @@ Note: You may need to run `mvn clean` after changing this setting to remove any
|
|||
</project>
|
||||
```
|
||||
|
||||
### Running Integration Tests
|
||||
|
||||
#### Pre-Requisites for ITs
|
||||
Along with the pre-requisites for [SDK](#pre-requisites) the following are needed.
|
||||
### Running Integration Tests (ITs)
|
||||
|
||||
#### Pre-Requisites
|
||||
* [Pre-Requisites for the SDK](#pre-requisites)
|
||||
* Docker installed
|
||||
* [Docker Compose](https://docs.docker.com/compose/install/)
|
||||
* [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
@ -229,8 +236,7 @@ Along with the pre-requisites for [SDK](#pre-requisites) the following are neede
|
|||
The code for the tests are present inside the project [sdk-tests](./sdk-tests). This module alone can be imported as a separate project in IDEs.
|
||||
This project depends on the rest of the JARs built by the other modules in the repo like [sdk](./sdk), [sdk-springboot](./sdk-springboot) etc.
|
||||
|
||||
As a starting point for running Integration Tests, first run `mvn clean install` from the root of the repo to build the JARs for the different modules
|
||||
except the `sdk-tests` module.
|
||||
As a starting point for running the Integration Tests, first run `./mvnw clean install` from the root of the repo to build the JARs for the different modules, except the `sdk-tests` module.
|
||||
|
||||
#### Run all the dependent services spun up during build
|
||||
|
||||
|
@ -241,13 +247,13 @@ Similarly, all of these need to be run for running the ITs either individually o
|
|||
Run the following commands from the root of the repo to start all the docker containers that the tests depend on.
|
||||
|
||||
```bash
|
||||
docker-compose -f ./sdk-tests/deploy/local-test.yml up -d
|
||||
docker compose -f ./sdk-tests/deploy/local-test.yml up -d
|
||||
```
|
||||
|
||||
To stop the containers and services, run the following commands.
|
||||
|
||||
```bash
|
||||
docker-compose -f ./sdk-tests/deploy/local-test.yml down
|
||||
docker compose -f ./sdk-tests/deploy/local-test.yml down
|
||||
```
|
||||
|
||||
|
||||
|
@ -257,7 +263,7 @@ From the `java-sdk` repo root, change to the `sdk-tests` directory and run the f
|
|||
```bash
|
||||
## with current directory as /java-sdk/sdk-tests/
|
||||
|
||||
mvn clean install
|
||||
../mvnw clean install
|
||||
```
|
||||
|
||||
The above command runs all the integration tests present in the `sdk-tests` project.
|
||||
|
|
509
checkstyle.xml
|
@ -13,8 +13,8 @@
|
|||
-->
|
||||
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
|
||||
"https://checkstyle.org/dtds/configuration_1_3.dtd">
|
||||
|
||||
<!--
|
||||
Checkstyle configuration that checks the Google coding conventions from Google Java Style
|
||||
|
@ -28,262 +28,273 @@
|
|||
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
|
||||
-->
|
||||
|
||||
<module name = "Checker">
|
||||
<property name="charset" value="UTF-8"/>
|
||||
<module name="Checker">
|
||||
<property name="charset" value="UTF-8"/>
|
||||
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="severity" value="warning"/>
|
||||
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
<!-- Excludes all 'module-info.java' files -->
|
||||
<!-- See https://checkstyle.org/config_filefilters.html -->
|
||||
<module name="BeforeExecutionExclusionFileFilter">
|
||||
<property name="fileNamePattern" value="module\-info\.java$"/>
|
||||
</module>
|
||||
<!-- Checks for whitespace -->
|
||||
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<property name="max" value="120"/>
|
||||
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpHeader">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<property name="headerFile" value=".java_header"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="IllegalTokenText">
|
||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||
<property name="format"
|
||||
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
||||
<property name="message"
|
||||
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
|
||||
<property name="fileExtensions" value="java, properties, xml"/>
|
||||
<!-- Excludes all 'module-info.java' files -->
|
||||
<!-- See https://checkstyle.org/config_filefilters.html -->
|
||||
<module name="BeforeExecutionExclusionFileFilter">
|
||||
<property name="fileNamePattern" value="module\-info\.java$"/>
|
||||
</module>
|
||||
<module name="AvoidEscapedUnicodeCharacters">
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
<!-- Checks for whitespace -->
|
||||
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
</module>
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens"
|
||||
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<property name="max" value="120"/>
|
||||
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="RightCurly">
|
||||
<property name="id" value="RightCurlySame"/>
|
||||
<property name="tokens"
|
||||
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
|
||||
|
||||
<module name="RegexpHeader">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="IllegalTokenText">
|
||||
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
|
||||
<property name="format"
|
||||
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
|
||||
<property name="message"
|
||||
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
|
||||
</module>
|
||||
<module name="AvoidEscapedUnicodeCharacters">
|
||||
<property name="allowEscapesForControlCharacters" value="true"/>
|
||||
<property name="allowByTailComment" value="true"/>
|
||||
<property name="allowNonPrintableEscapes" value="true"/>
|
||||
</module>
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="OneTopLevelClass"/>
|
||||
<module name="NoLineWrap"/>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="TEXT"/>
|
||||
<property name="tokens"
|
||||
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="LeftCurly"/>
|
||||
<module name="RightCurly">
|
||||
<property name="id" value="RightCurlySame"/>
|
||||
<property name="tokens"
|
||||
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
|
||||
LITERAL_DO"/>
|
||||
</module>
|
||||
<module name="RightCurly">
|
||||
<property name="id" value="RightCurlyAlone"/>
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens"
|
||||
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
|
||||
</module>
|
||||
<module name="RightCurly">
|
||||
<property name="id" value="RightCurlyAlone"/>
|
||||
<property name="option" value="alone"/>
|
||||
<property name="tokens"
|
||||
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
|
||||
INSTANCE_INIT"/>
|
||||
</module>
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyConstructors" value="true"/>
|
||||
<property name="allowEmptyLambdas" value="true"/>
|
||||
<property name="allowEmptyMethods" value="true"/>
|
||||
<property name="allowEmptyTypes" value="true"/>
|
||||
<property name="allowEmptyLoops" value="true"/>
|
||||
<message key="ws.notFollowed"
|
||||
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
|
||||
<message key="ws.notPreceded"
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="ArrayTypeStyle"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="FallThrough"/>
|
||||
<module name="UpperEll"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapDot"/>
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapComma"/>
|
||||
<property name="tokens" value="COMMA"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
|
||||
<property name="id" value="SeparatorWrapEllipsis"/>
|
||||
<property name="tokens" value="ELLIPSIS"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
|
||||
<property name="id" value="SeparatorWrapArrayDeclarator"/>
|
||||
<property name="tokens" value="ARRAY_DECLARATOR"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapMethodRef"/>
|
||||
<property name="tokens" value="METHOD_REF"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="TypeName">
|
||||
<message key="name.invalidPattern"
|
||||
value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LambdaParameterName">
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="CatchParameterName">
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ClassTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MethodTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="InterfaceTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="NoFinalizer"/>
|
||||
<module name="GenericWhitespace">
|
||||
<message key="ws.followed"
|
||||
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||
<message key="ws.preceded"
|
||||
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||
<message key="ws.illegalFollow"
|
||||
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||
<message key="ws.notPreceded"
|
||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="2"/>
|
||||
<property name="braceAdjustment" value="0"/>
|
||||
<property name="caseIndent" value="2"/>
|
||||
<property name="throwsIndent" value="4"/>
|
||||
<property name="lineWrappingIndentation" value="4"/>
|
||||
<property name="arrayInitIndent" value="2"/>
|
||||
</module>
|
||||
<module name="AbbreviationAsWordInName">
|
||||
<property name="ignoreFinal" value="false"/>
|
||||
<property name="allowedAbbreviationLength" value="1"/>
|
||||
</module>
|
||||
<module name="OverloadMethodsDeclarationOrder"/>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="NoWhitespaceBefore">
|
||||
<property name="tokens"
|
||||
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
|
||||
<property name="allowLineBreaks" value="true"/>
|
||||
</module>
|
||||
<module name="ParenPad"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<property name="tokens"
|
||||
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
|
||||
</module>
|
||||
<module name="WhitespaceAround">
|
||||
<property name="allowEmptyConstructors" value="true"/>
|
||||
<property name="allowEmptyLambdas" value="true"/>
|
||||
<property name="allowEmptyMethods" value="true"/>
|
||||
<property name="allowEmptyTypes" value="true"/>
|
||||
<property name="allowEmptyLoops" value="true"/>
|
||||
<message key="ws.notFollowed"
|
||||
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
|
||||
<message key="ws.notPreceded"
|
||||
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="OneStatementPerLine"/>
|
||||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="ArrayTypeStyle"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<module name="FallThrough"/>
|
||||
<module name="UpperEll"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="EmptyLineSeparator">
|
||||
<property name="allowNoEmptyLineBetweenFields" value="true"/>
|
||||
<property name="allowMultipleEmptyLines" value="false"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapDot"/>
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapComma"/>
|
||||
<property name="tokens" value="COMMA"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
|
||||
<property name="id" value="SeparatorWrapEllipsis"/>
|
||||
<property name="tokens" value="ELLIPSIS"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
|
||||
<property name="id" value="SeparatorWrapArrayDeclarator"/>
|
||||
<property name="tokens" value="ARRAY_DECLARATOR"/>
|
||||
<property name="option" value="EOL"/>
|
||||
</module>
|
||||
<module name="SeparatorWrap">
|
||||
<property name="id" value="SeparatorWrapMethodRef"/>
|
||||
<property name="tokens" value="METHOD_REF"/>
|
||||
<property name="option" value="nl"/>
|
||||
</module>
|
||||
<module name="PackageName">
|
||||
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Package name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="TypeName">
|
||||
<message key="name.invalidPattern"
|
||||
value="Type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Member name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LambdaParameterName">
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="CatchParameterName">
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="LocalVariableName">
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="ClassTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Class type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="MethodTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="InterfaceTypeParameterName">
|
||||
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="NoFinalizer"/>
|
||||
<module name="GenericWhitespace">
|
||||
<message key="ws.followed"
|
||||
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
|
||||
<message key="ws.preceded"
|
||||
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
|
||||
<message key="ws.illegalFollow"
|
||||
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
|
||||
<message key="ws.notPreceded"
|
||||
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
|
||||
</module>
|
||||
<module name="Indentation">
|
||||
<property name="basicOffset" value="2"/>
|
||||
<property name="braceAdjustment" value="0"/>
|
||||
<property name="caseIndent" value="2"/>
|
||||
<property name="throwsIndent" value="4"/>
|
||||
<property name="lineWrappingIndentation" value="4"/>
|
||||
<property name="arrayInitIndent" value="2"/>
|
||||
</module>
|
||||
<module name="AbbreviationAsWordInName">
|
||||
<property name="ignoreFinal" value="false"/>
|
||||
<property name="allowedAbbreviationLength" value="1"/>
|
||||
</module>
|
||||
<module name="OverloadMethodsDeclarationOrder"/>
|
||||
<module name="VariableDeclarationUsageDistance"/>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="NoWhitespaceBefore">
|
||||
<property name="tokens"
|
||||
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
|
||||
<property name="allowLineBreaks" value="true"/>
|
||||
</module>
|
||||
<module name="ParenPad"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="option" value="NL"/>
|
||||
<property name="tokens"
|
||||
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
|
||||
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="id" value="AnnotationLocationMostCases"/>
|
||||
<property name="tokens"
|
||||
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="id" value="AnnotationLocationVariables"/>
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="InvalidJavadocPosition"/>
|
||||
<module name="JavadocTagContinuationIndentation"/>
|
||||
<module name="SummaryJavadoc">
|
||||
<property name="forbiddenSummaryFragments"
|
||||
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||
</module>
|
||||
<module name="JavadocParagraph"/>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
<property name="target"
|
||||
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="allowedAnnotations" value="Override, Test"/>
|
||||
</module>
|
||||
<module name="MissingJavadocMethod">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="minLineCount" value="2"/>
|
||||
<property name="allowedAnnotations" value="Override, Test"/>
|
||||
</module>
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="SingleLineJavadoc">
|
||||
<property name="ignoreInlineTags" value="false"/>
|
||||
</module>
|
||||
<module name="EmptyCatchBlock">
|
||||
<property name="exceptionVariableName" value="expected"/>
|
||||
</module>
|
||||
<module name="CommentsIndentation"/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="id" value="AnnotationLocationMostCases"/>
|
||||
<property name="tokens"
|
||||
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
|
||||
</module>
|
||||
<module name="AnnotationLocation">
|
||||
<property name="id" value="AnnotationLocationVariables"/>
|
||||
<property name="tokens" value="VARIABLE_DEF"/>
|
||||
<property name="allowSamelineMultipleAnnotations" value="true"/>
|
||||
</module>
|
||||
<module name="NonEmptyAtclauseDescription"/>
|
||||
<module name="InvalidJavadocPosition"/>
|
||||
<module name="JavadocTagContinuationIndentation"/>
|
||||
<module name="SummaryJavadoc">
|
||||
<property name="forbiddenSummaryFragments"
|
||||
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
|
||||
</module>
|
||||
<module name="JavadocParagraph"/>
|
||||
<module name="AtclauseOrder">
|
||||
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
|
||||
<property name="target"
|
||||
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="accessModifiers" value="public"/>
|
||||
<property name="allowedAnnotations" value="Override, Test"/>
|
||||
</module>
|
||||
<module name="MissingJavadocMethod">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="minLineCount" value="2"/>
|
||||
<property name="allowedAnnotations" value="Override, Test"/>
|
||||
</module>
|
||||
<module name="MethodName">
|
||||
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
|
||||
<message key="name.invalidPattern"
|
||||
value="Method name ''{0}'' must match pattern ''{1}''."/>
|
||||
</module>
|
||||
<module name="SingleLineJavadoc">
|
||||
<property name="ignoreInlineTags" value="false"/>
|
||||
</module>
|
||||
<module name="EmptyCatchBlock">
|
||||
<property name="exceptionVariableName" value="expected"/>
|
||||
</module>
|
||||
<module name="CommentsIndentation"/>
|
||||
|
||||
<module name="ImportOrder">
|
||||
<property name="groups" value="*,javax,java"/>
|
||||
<property name="ordered" value="true"/>
|
||||
<property name="separated" value="true"/>
|
||||
<property name="option" value="bottom"/>
|
||||
<property name="sortStaticImportsAlphabetically" value="true"/>
|
||||
<module name="ImportOrder">
|
||||
<property name="groups" value="*,javax,java"/>
|
||||
<property name="ordered" value="true"/>
|
||||
<property name="separated" value="true"/>
|
||||
<property name="option" value="bottom"/>
|
||||
<property name="sortStaticImportsAlphabetically" value="true"/>
|
||||
</module>
|
||||
<module name="SuppressionXpathSingleFilter">
|
||||
<property name="checks" value="ImportOrder"/>
|
||||
<property name="message" value="^'java\..*'.*"/>
|
||||
</module>
|
||||
<module name="SuppressWarningsHolder"/>
|
||||
</module>
|
||||
<module name="SuppressionXpathSingleFilter">
|
||||
<property name="checks" value="ImportOrder"/>
|
||||
<property name="message" value="^'java\..*'.*"/>
|
||||
<module name="SuppressWarningsFilter"/>
|
||||
<module name="RegexpHeader">
|
||||
<property name="headerFile" value="${checkstyle.header.file}"/>
|
||||
<property name="fileExtensions" value="java,xml"/>
|
||||
</module>
|
||||
</module>
|
||||
<module name="SuppressionSingleFilter">
|
||||
<property name="checks" value="RegexpHeader"/>
|
||||
<property name="files" value=".*\.properties$"/>
|
||||
</module>
|
||||
<module name="NewlineAtEndOfFile"/>
|
||||
</module>
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-spring-boot-autoconfigure</artifactId>
|
||||
<name>dapr-spring-boot-autoconfigure</name>
|
||||
<description>Dapr Spring Boot Autoconfigure</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-data</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-actors</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-messaging</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-workflows</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-keyvalue</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>testcontainers</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.vaadin.external.google</groupId>
|
||||
<artifactId>android-json</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>testcontainers-dapr</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
public class ClientPropertiesDaprConnectionDetails implements DaprConnectionDetails {
|
||||
|
||||
private final DaprClientProperties daprClientProperties;
|
||||
|
||||
public ClientPropertiesDaprConnectionDetails(DaprClientProperties daprClientProperties) {
|
||||
this.daprClientProperties = daprClientProperties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHttpEndpoint() {
|
||||
return this.daprClientProperties.getHttpEndpoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrpcEndpoint() {
|
||||
return this.daprClientProperties.getGrpcEndpoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getHttpPort() {
|
||||
return this.daprClientProperties.getHttpPort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getGrpcPort() {
|
||||
return this.daprClientProperties.getGrpcPort();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
import io.dapr.actors.client.ActorClient;
|
||||
import io.dapr.actors.runtime.ActorRuntime;
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.client.DaprClientBuilder;
|
||||
import io.dapr.config.Properties;
|
||||
import io.dapr.workflows.client.DaprWorkflowClient;
|
||||
import io.dapr.workflows.runtime.WorkflowRuntimeBuilder;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass(DaprClient.class)
|
||||
@EnableConfigurationProperties(DaprClientProperties.class)
|
||||
public class DaprClientAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(DaprConnectionDetails.class)
|
||||
DaprConnectionDetails daprConnectionDetails(DaprClientProperties properties) {
|
||||
return new ClientPropertiesDaprConnectionDetails(properties);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
DaprClientBuilder daprClientBuilder(DaprConnectionDetails daprConnectionDetails) {
|
||||
DaprClientBuilder builder = createDaprClientBuilder();
|
||||
String httpEndpoint = daprConnectionDetails.getHttpEndpoint();
|
||||
|
||||
if (httpEndpoint != null) {
|
||||
builder.withPropertyOverride(Properties.HTTP_ENDPOINT, httpEndpoint);
|
||||
}
|
||||
|
||||
String grpcEndpoint = daprConnectionDetails.getGrpcEndpoint();
|
||||
|
||||
if (grpcEndpoint != null) {
|
||||
builder.withPropertyOverride(Properties.GRPC_ENDPOINT, grpcEndpoint);
|
||||
}
|
||||
|
||||
Integer httpPort = daprConnectionDetails.getHttpPort();
|
||||
|
||||
if (httpPort != null) {
|
||||
builder.withPropertyOverride(Properties.HTTP_PORT, String.valueOf(httpPort));
|
||||
}
|
||||
|
||||
Integer grpcPort = daprConnectionDetails.getGrpcPort();
|
||||
|
||||
if (grpcPort != null) {
|
||||
builder.withPropertyOverride(Properties.GRPC_PORT, String.valueOf(grpcPort));
|
||||
}
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
DaprClient daprClient(DaprClientBuilder daprClientBuilder) {
|
||||
return daprClientBuilder.build();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
DaprWorkflowClient daprWorkflowClient(DaprConnectionDetails daprConnectionDetails) {
|
||||
Properties properties = createPropertiesFromConnectionDetails(daprConnectionDetails);
|
||||
return new DaprWorkflowClient(properties);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
ActorClient daprActorClient(DaprConnectionDetails daprConnectionDetails) {
|
||||
Properties properties = createPropertiesFromConnectionDetails(daprConnectionDetails);
|
||||
return new ActorClient(properties);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
ActorRuntime daprActorRuntime(DaprConnectionDetails daprConnectionDetails) {
|
||||
Properties properties = createPropertiesFromConnectionDetails(daprConnectionDetails);
|
||||
return ActorRuntime.getInstance(properties);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
WorkflowRuntimeBuilder daprWorkflowRuntimeBuilder(DaprConnectionDetails daprConnectionDetails) {
|
||||
Properties properties = createPropertiesFromConnectionDetails(daprConnectionDetails);
|
||||
|
||||
return new WorkflowRuntimeBuilder(properties);
|
||||
}
|
||||
|
||||
/**
|
||||
* We use this method in tests to override the default DaprClientBuilder.
|
||||
*/
|
||||
protected DaprClientBuilder createDaprClientBuilder() {
|
||||
return new DaprClientBuilder();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Properties object from the DaprConnectionDetails.
|
||||
*
|
||||
* @param daprConnectionDetails the DaprConnectionDetails
|
||||
* @return the Properties object
|
||||
*/
|
||||
protected Properties createPropertiesFromConnectionDetails(DaprConnectionDetails daprConnectionDetails) {
|
||||
Map<String, String> propertyOverrides = new HashMap<>();
|
||||
String httpEndpoint = daprConnectionDetails.getHttpEndpoint();
|
||||
|
||||
if (httpEndpoint != null) {
|
||||
propertyOverrides.put(Properties.HTTP_ENDPOINT.getName(), httpEndpoint);
|
||||
}
|
||||
|
||||
Integer httpPort = daprConnectionDetails.getHttpPort();
|
||||
|
||||
if (httpPort != null) {
|
||||
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(httpPort));
|
||||
}
|
||||
|
||||
String grpcEndpoint = daprConnectionDetails.getGrpcEndpoint();
|
||||
|
||||
if (grpcEndpoint != null) {
|
||||
propertyOverrides.put(Properties.GRPC_ENDPOINT.getName(), grpcEndpoint);
|
||||
}
|
||||
|
||||
Integer grpcPort = daprConnectionDetails.getGrpcPort();
|
||||
|
||||
if (grpcPort != null) {
|
||||
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(grpcPort));
|
||||
}
|
||||
|
||||
return new Properties(propertyOverrides);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
import io.dapr.spring.data.DaprKeyValueAdapterResolver;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@ConfigurationProperties(prefix = "dapr.client")
|
||||
public class DaprClientProperties {
|
||||
private String httpEndpoint;
|
||||
private String grpcEndpoint;
|
||||
private Integer httpPort;
|
||||
private Integer grpcPort;
|
||||
|
||||
/**
|
||||
* Constructs a {@link DaprClientProperties}.
|
||||
*/
|
||||
public DaprClientProperties() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a {@link DaprClientProperties}.
|
||||
* @param httpEndpoint http endpoint to interact with the Dapr Sidecar
|
||||
* @param grpcEndpoint grpc endpoint to interact with the Dapr Sidecar
|
||||
* @param httpPort http port to interact with the Dapr Sidecar
|
||||
* @param grpcPort grpc port to interact with the Dapr Sidecar
|
||||
*/
|
||||
public DaprClientProperties(String httpEndpoint, String grpcEndpoint, Integer httpPort, Integer grpcPort) {
|
||||
this.httpEndpoint = httpEndpoint;
|
||||
this.grpcEndpoint = grpcEndpoint;
|
||||
this.httpPort = httpPort;
|
||||
this.grpcPort = grpcPort;
|
||||
}
|
||||
|
||||
public String getHttpEndpoint() {
|
||||
return httpEndpoint;
|
||||
}
|
||||
|
||||
public String getGrpcEndpoint() {
|
||||
return grpcEndpoint;
|
||||
}
|
||||
|
||||
public Integer getHttpPort() {
|
||||
return httpPort;
|
||||
}
|
||||
|
||||
public Integer getGrpcPort() {
|
||||
return grpcPort;
|
||||
}
|
||||
|
||||
public void setHttpEndpoint(String httpEndpoint) {
|
||||
this.httpEndpoint = httpEndpoint;
|
||||
}
|
||||
|
||||
public void setGrpcEndpoint(String grpcEndpoint) {
|
||||
this.grpcEndpoint = grpcEndpoint;
|
||||
}
|
||||
|
||||
public void setHttpPort(Integer httpPort) {
|
||||
this.httpPort = httpPort;
|
||||
}
|
||||
|
||||
public void setGrpcPort(Integer grpcPort) {
|
||||
this.grpcPort = grpcPort;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
||||
|
||||
public interface DaprConnectionDetails extends ConnectionDetails {
|
||||
|
||||
String getHttpEndpoint();
|
||||
|
||||
String getGrpcEndpoint();
|
||||
|
||||
Integer getHttpPort();
|
||||
|
||||
Integer getGrpcPort();
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.pubsub;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@ConfigurationProperties(prefix = DaprPubSubProperties.CONFIG_PREFIX)
|
||||
public class DaprPubSubProperties {
|
||||
|
||||
public static final String CONFIG_PREFIX = "dapr.pubsub";
|
||||
|
||||
/**
|
||||
* Name of the PubSub Dapr component.
|
||||
*/
|
||||
private String name;
|
||||
private boolean observationEnabled;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean isObservationEnabled() {
|
||||
return observationEnabled;
|
||||
}
|
||||
|
||||
public void setObservationEnabled(boolean observationEnabled) {
|
||||
this.observationEnabled = observationEnabled;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.statestore;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
@ConfigurationProperties(prefix = DaprStateStoreProperties.CONFIG_PREFIX)
|
||||
public class DaprStateStoreProperties {
|
||||
|
||||
public static final String CONFIG_PREFIX = "dapr.statestore";
|
||||
|
||||
/**
|
||||
* Name of the StateStore Dapr component.
|
||||
*/
|
||||
private String name;
|
||||
private String binding;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getBinding() {
|
||||
return binding;
|
||||
}
|
||||
|
||||
public void setBinding(String binding) {
|
||||
this.binding = binding;
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
io.dapr.spring.boot.autoconfigure.client.DaprClientAutoConfiguration
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.client.DaprClientBuilder;
|
||||
import io.dapr.config.Properties;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.junit.jupiter.MockitoExtension;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link DaprClientAutoConfiguration}.
|
||||
*/
|
||||
@ExtendWith(MockitoExtension.class)
|
||||
class DaprClientAutoConfigurationTest {
|
||||
|
||||
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
|
||||
.withConfiguration(AutoConfigurations.of(DaprClientAutoConfiguration.class));
|
||||
|
||||
@Mock
|
||||
private DaprConnectionDetails connectionDetails;
|
||||
|
||||
@Mock
|
||||
private DaprClientBuilder builder;
|
||||
|
||||
private DaprClientAutoConfiguration configuration;
|
||||
|
||||
@Test
|
||||
void daprClientBuilder() {
|
||||
contextRunner.run(context -> assertThat(context).hasSingleBean(DaprClientBuilder.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void daprClient() {
|
||||
contextRunner.run(context -> assertThat(context).hasSingleBean(DaprClient.class));
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
configuration = new TestDaprClientAutoConfiguration(builder);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override HTTP endpoint if it exists")
|
||||
void shouldOverrideHttpEndpointIfExists() {
|
||||
String httpEndpoint = "http://localhost:3500";
|
||||
|
||||
when(connectionDetails.getHttpEndpoint()).thenReturn(httpEndpoint);
|
||||
|
||||
configuration.daprClientBuilder(connectionDetails);
|
||||
|
||||
verify(builder).withPropertyOverride(Properties.HTTP_ENDPOINT, httpEndpoint);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override GRPC endpoint if it exists")
|
||||
void shouldOverrideGrpcEndpointIfExists() {
|
||||
String grpcEndpoint = "grpc://localhost:5001";
|
||||
|
||||
when(connectionDetails.getGrpcEndpoint()).thenReturn(grpcEndpoint);
|
||||
|
||||
configuration.daprClientBuilder(connectionDetails);
|
||||
|
||||
verify(builder).withPropertyOverride(Properties.GRPC_ENDPOINT, grpcEndpoint);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override HTTP port if it exists")
|
||||
void shouldOverrideHttpPortIfExists() {
|
||||
Integer httpPort = 3600;
|
||||
|
||||
when(connectionDetails.getHttpPort()).thenReturn(httpPort);
|
||||
|
||||
configuration.daprClientBuilder(connectionDetails);
|
||||
|
||||
verify(builder).withPropertyOverride(Properties.HTTP_PORT, String.valueOf(httpPort));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override GRPC port if it exists")
|
||||
void shouldOverrideGrpcPortIfExists() {
|
||||
Integer grpcPort = 6001;
|
||||
|
||||
when(connectionDetails.getGrpcPort()).thenReturn(grpcPort);
|
||||
|
||||
configuration.daprClientBuilder(connectionDetails);
|
||||
|
||||
verify(builder).withPropertyOverride(Properties.GRPC_PORT, String.valueOf(grpcPort));
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override HTTP endpoint in properties if it exists")
|
||||
void shouldOverrideHttpEndpointInPropertiesIfExists() {
|
||||
String httpEndpoint = "http://localhost:3500";
|
||||
|
||||
when(connectionDetails.getHttpEndpoint()).thenReturn(httpEndpoint);
|
||||
|
||||
Properties reuslt = configuration.createPropertiesFromConnectionDetails(connectionDetails);
|
||||
|
||||
assertThat(reuslt.getValue(Properties.HTTP_ENDPOINT)).isEqualTo(httpEndpoint);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override GRPC endpoint in properties if it exists")
|
||||
void shouldOverrideGrpcEndpointPropertiesIfExists() {
|
||||
String grpcEndpoint = "grpc://localhost:3500";
|
||||
|
||||
when(connectionDetails.getGrpcEndpoint()).thenReturn(grpcEndpoint);
|
||||
|
||||
Properties result = configuration.createPropertiesFromConnectionDetails(connectionDetails);
|
||||
|
||||
assertThat(result.getValue(Properties.GRPC_ENDPOINT)).isEqualTo(grpcEndpoint);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override HTTP port in properties if it exists")
|
||||
void shouldOverrideHttpPortPropertiesIfExists() {
|
||||
Integer httpPort = 3600;
|
||||
|
||||
when(connectionDetails.getHttpPort()).thenReturn(httpPort);
|
||||
|
||||
Properties result = configuration.createPropertiesFromConnectionDetails(connectionDetails);
|
||||
|
||||
assertThat(result.getValue(Properties.HTTP_PORT)).isEqualTo(httpPort);
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should override GRPC port in properties if it exists")
|
||||
void shouldOverrideGrpcPortPropertiesIfExists() {
|
||||
Integer grpcPort = 6001;
|
||||
|
||||
when(connectionDetails.getGrpcPort()).thenReturn(grpcPort);
|
||||
|
||||
Properties result = configuration.createPropertiesFromConnectionDetails(connectionDetails);
|
||||
|
||||
assertThat(result.getValue(Properties.GRPC_PORT)).isEqualTo(grpcPort);
|
||||
}
|
||||
|
||||
private static class TestDaprClientAutoConfiguration extends DaprClientAutoConfiguration {
|
||||
|
||||
private final DaprClientBuilder daprClientBuilder;
|
||||
|
||||
public TestDaprClientAutoConfiguration(DaprClientBuilder daprClientBuilder) {
|
||||
this.daprClientBuilder = daprClientBuilder;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DaprClientBuilder createDaprClientBuilder() {
|
||||
return daprClientBuilder;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Copyright 2025 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
import org.assertj.core.api.SoftAssertions;
|
||||
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
public class DaprClientPropertiesTest {
|
||||
|
||||
|
||||
private final ApplicationContextRunner runner = new ApplicationContextRunner()
|
||||
.withUserConfiguration(EnableDaprClientProperties.class);
|
||||
|
||||
@Test
|
||||
@DisplayName("Should create DaprClientProperties correctly through constructor")
|
||||
public void shouldCreateDaprClientPropertiesCorrectly() {
|
||||
|
||||
DaprClientProperties properties = new DaprClientProperties(
|
||||
"http://localhost", "localhost", 3500, 50001
|
||||
);
|
||||
|
||||
SoftAssertions.assertSoftly(softly -> {
|
||||
softly.assertThat(properties.getGrpcEndpoint()).isEqualTo("localhost");
|
||||
softly.assertThat(properties.getHttpEndpoint()).isEqualTo("http://localhost");
|
||||
softly.assertThat(properties.getHttpPort()).isEqualTo(3500);
|
||||
softly.assertThat(properties.getGrpcPort()).isEqualTo(50001);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should create DaprClientProperties correctly through setters")
|
||||
public void shouldSetDaprClientPropertiesCorrectly() {
|
||||
|
||||
DaprClientProperties properties = new DaprClientProperties();
|
||||
|
||||
properties.setGrpcEndpoint("localhost");
|
||||
properties.setGrpcPort(50001);
|
||||
properties.setHttpEndpoint("http://localhost");
|
||||
properties.setHttpPort(3500);
|
||||
|
||||
SoftAssertions.assertSoftly(softAssertions -> {
|
||||
softAssertions.assertThat(properties.getGrpcEndpoint()).isEqualTo("localhost");
|
||||
softAssertions.assertThat(properties.getHttpEndpoint()).isEqualTo("http://localhost");
|
||||
softAssertions.assertThat(properties.getHttpPort()).isEqualTo(3500);
|
||||
softAssertions.assertThat(properties.getGrpcPort()).isEqualTo(50001);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should map DaprClient properties correctly")
|
||||
public void shouldMapDaprClientProperties() {
|
||||
|
||||
runner.withSystemProperties(
|
||||
"dapr.client.http-endpoint=http://localhost",
|
||||
"dapr.client.http-port=3500",
|
||||
"dapr.client.grpc-endpoint=localhost",
|
||||
"dapr.client.grpc-port=50001"
|
||||
).run(context -> {
|
||||
DaprClientProperties properties = context.getBean(DaprClientProperties.class);
|
||||
SoftAssertions.assertSoftly(softly -> {
|
||||
softly.assertThat(properties.getGrpcEndpoint()).isEqualTo("localhost");
|
||||
softly.assertThat(properties.getHttpEndpoint()).isEqualTo("http://localhost");
|
||||
softly.assertThat(properties.getHttpPort()).isEqualTo(3500);
|
||||
softly.assertThat(properties.getGrpcPort()).isEqualTo(50001);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@EnableConfigurationProperties(DaprClientProperties.class)
|
||||
static class EnableDaprClientProperties {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
import io.dapr.spring.boot.autoconfigure.client.workflows.TestActivity;
|
||||
import io.dapr.spring.boot.autoconfigure.client.workflows.TestWorkflow;
|
||||
import io.dapr.workflows.client.DaprWorkflowClient;
|
||||
import io.dapr.workflows.runtime.WorkflowRuntimeBuilder;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
@SpringBootTest(classes = {WorkflowTestApplication.class, DaprClientAutoConfiguration.class, TestActivity.class, TestWorkflow.class})
|
||||
public class DaprWorkflowsRegistrationTests {
|
||||
|
||||
@Autowired
|
||||
private DaprWorkflowClient daprWorkflowClient;
|
||||
|
||||
@Autowired
|
||||
private WorkflowRuntimeBuilder workflowRuntimeBuilder;
|
||||
|
||||
@Autowired
|
||||
private TestActivity testActivity;
|
||||
|
||||
@Autowired
|
||||
private TestWorkflow testWorkflow;
|
||||
|
||||
@Test
|
||||
public void testWorkflowInjection(){
|
||||
|
||||
//I cannot test here if the client works, as it needs the runtime
|
||||
assertNotNull(daprWorkflowClient);
|
||||
|
||||
//@TODO: there is no way to assert the runtime and its registered workflows and activities
|
||||
assertNotNull(workflowRuntimeBuilder);
|
||||
|
||||
//Check that both Activities and Workflows are managed beans
|
||||
assertNotNull(testActivity);
|
||||
assertNotNull(testWorkflow);
|
||||
assertNotNull(testActivity.getRestTemplate());
|
||||
assertNotNull(testWorkflow.getRestTemplate());
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package io.dapr.spring.boot.autoconfigure.client;
|
||||
|
||||
import io.dapr.spring.workflows.config.EnableDaprWorkflows;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDaprWorkflows
|
||||
public class WorkflowTestApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(WorkflowTestApplication.class, args);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class Config {
|
||||
@Bean
|
||||
RestTemplate restTemplate(){
|
||||
return new RestTemplate();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package io.dapr.spring.boot.autoconfigure.client.workflows;
|
||||
|
||||
import io.dapr.workflows.WorkflowActivity;
|
||||
import io.dapr.workflows.WorkflowActivityContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
public class TestActivity implements WorkflowActivity {
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@Override
|
||||
public Object run(WorkflowActivityContext ctx) {
|
||||
return "OK";
|
||||
}
|
||||
|
||||
public RestTemplate getRestTemplate() {
|
||||
return restTemplate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package io.dapr.spring.boot.autoconfigure.client.workflows;
|
||||
|
||||
import io.dapr.workflows.Workflow;
|
||||
import io.dapr.workflows.WorkflowStub;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
public class TestWorkflow implements Workflow {
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
|
||||
@Override
|
||||
public WorkflowStub create() {
|
||||
return ctx -> {
|
||||
ctx.callActivity(TestActivity.class.getName(), null).await();
|
||||
};
|
||||
}
|
||||
|
||||
public RestTemplate getRestTemplate() {
|
||||
return restTemplate;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright 2025 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.pubsub;
|
||||
|
||||
import org.assertj.core.api.SoftAssertions;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
public class DaprPubSubPropertiesTest {
|
||||
|
||||
final ApplicationContextRunner runner = new ApplicationContextRunner()
|
||||
.withUserConfiguration(EnableDaprPubSubProperties.class);
|
||||
|
||||
|
||||
@Test
|
||||
@DisplayName("Should configure properties with setters")
|
||||
void shouldSetProperties() {
|
||||
DaprPubSubProperties properties = new DaprPubSubProperties();
|
||||
properties.setName("pubsub");
|
||||
properties.setObservationEnabled(false);
|
||||
|
||||
SoftAssertions.assertSoftly(softAssertions -> {
|
||||
softAssertions.assertThat(properties.getName()).isEqualTo("pubsub");
|
||||
softAssertions.assertThat(properties.isObservationEnabled()).isEqualTo(false);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should map DaprPubSubProperties correctly")
|
||||
void shouldMapDaprPubSubPropertiesCorrectly() {
|
||||
runner.withPropertyValues(
|
||||
"dapr.pubsub.name=pubsub",
|
||||
"dapr.pubsub.observation-enabled=true"
|
||||
).run(context -> {
|
||||
DaprPubSubProperties properties = context.getBean(DaprPubSubProperties.class);
|
||||
|
||||
SoftAssertions.assertSoftly(softAssertions -> {
|
||||
softAssertions.assertThat(properties.getName()).isEqualTo("pubsub");
|
||||
softAssertions.assertThat(properties.isObservationEnabled()).isEqualTo(true);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@EnableConfigurationProperties(DaprPubSubProperties.class)
|
||||
static class EnableDaprPubSubProperties {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Copyright 2021 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.autoconfigure.statestore;
|
||||
|
||||
import org.assertj.core.api.SoftAssertions;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
||||
public class DaprStateStorePropertiesTest {
|
||||
|
||||
|
||||
final ApplicationContextRunner runner = new ApplicationContextRunner()
|
||||
.withUserConfiguration(EnableDaprStateStoreProperties.class);
|
||||
|
||||
@Test
|
||||
@DisplayName("Should create DaprStateStoreProperties via constructor")
|
||||
void shouldSetDaprStateStorePropertiesCorrectly() {
|
||||
DaprStateStoreProperties properties = new DaprStateStoreProperties();
|
||||
properties.setBinding("binding");
|
||||
properties.setName("name");
|
||||
|
||||
SoftAssertions.assertSoftly(softAssertions -> {
|
||||
softAssertions.assertThat(properties.getName()).isEqualTo("name");
|
||||
softAssertions.assertThat(properties.getBinding()).isEqualTo("binding");
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@DisplayName("Should map Dapr state store properties correctly")
|
||||
void shouldMapDaprStateStoreProperties() {
|
||||
runner.withPropertyValues(
|
||||
"dapr.statestore.name=name",
|
||||
"dapr.statestore.binding=binding"
|
||||
).run(context -> {
|
||||
DaprStateStoreProperties properties = context.getBean(DaprStateStoreProperties.class);
|
||||
|
||||
SoftAssertions.assertSoftly(softly -> {
|
||||
softly.assertThat(properties.getBinding()).isEqualTo("binding");
|
||||
softly.assertThat(properties.getName()).isEqualTo("name");
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@EnableConfigurationProperties(DaprStateStoreProperties.class)
|
||||
static class EnableDaprStateStoreProperties {
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-spring-boot-starter-test</artifactId>
|
||||
<name>dapr-spring-boot-starter-test</name>
|
||||
<description>Dapr Spring Boot Starter Tests (with Testcontainers Support)</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-tests</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>testcontainers-dapr</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-testcontainers</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-spring-boot-starter</artifactId>
|
||||
<name>dapr-spring-boot-starter</name>
|
||||
<description>Dapr Spring Boot Starter</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-springboot</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-data</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-messaging</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-workflows</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-spring-boot-tests</artifactId>
|
||||
<name>dapr-spring-boot-tests</name>
|
||||
<description>Dapr Spring Boot Tests</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-testcontainers</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.vaadin.external.google</groupId>
|
||||
<artifactId>android-json</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>testcontainers-dapr</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* Copyright 2021 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.boot.testcontainers.service.connection;
|
||||
|
||||
import io.dapr.spring.boot.autoconfigure.client.DaprConnectionDetails;
|
||||
import io.dapr.testcontainers.DaprContainer;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
|
||||
public class DaprContainerConnectionDetailsFactory
|
||||
extends ContainerConnectionDetailsFactory<DaprContainer, DaprConnectionDetails> {
|
||||
|
||||
DaprContainerConnectionDetailsFactory() {
|
||||
}
|
||||
|
||||
protected DaprConnectionDetails getContainerConnectionDetails(ContainerConnectionSource<DaprContainer> source) {
|
||||
return new DaprContainerConnectionDetails(source);
|
||||
}
|
||||
|
||||
private static final class DaprContainerConnectionDetails
|
||||
extends ContainerConnectionDetailsFactory.ContainerConnectionDetails<DaprContainer>
|
||||
implements DaprConnectionDetails {
|
||||
private DaprContainerConnectionDetails(ContainerConnectionSource<DaprContainer> source) {
|
||||
super(source);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHttpEndpoint() {
|
||||
return getContainer().getHttpEndpoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrpcEndpoint() {
|
||||
return getContainer().getGrpcEndpoint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getHttpPort() {
|
||||
return getContainer().getHttpPort();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getGrpcPort() {
|
||||
return getContainer().getGrpcPort();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
io.dapr.spring.boot.testcontainers.service.connection.DaprContainerConnectionDetailsFactory
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-spring-data</artifactId>
|
||||
<name>dapr-spring-data</name>
|
||||
<description>Dapr Spring Data</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-keyvalue</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,147 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.client.domain.GetStateRequest;
|
||||
import io.dapr.client.domain.SaveStateRequest;
|
||||
import io.dapr.client.domain.State;
|
||||
import io.dapr.utils.TypeRef;
|
||||
import org.springframework.data.keyvalue.core.KeyValueAdapter;
|
||||
import org.springframework.data.util.CloseableIterator;
|
||||
import org.springframework.util.Assert;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class AbstractDaprKeyValueAdapter implements KeyValueAdapter {
|
||||
private static final Map<String, String> CONTENT_TYPE_META = Map.of(
|
||||
"contentType", "application/json");
|
||||
|
||||
private final DaprClient daprClient;
|
||||
private final String stateStoreName;
|
||||
|
||||
protected AbstractDaprKeyValueAdapter(DaprClient daprClient, String stateStoreName) {
|
||||
Assert.notNull(daprClient, "DaprClient must not be null");
|
||||
Assert.hasText(stateStoreName, "State store name must not be empty");
|
||||
|
||||
this.daprClient = daprClient;
|
||||
this.stateStoreName = stateStoreName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
daprClient.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
// Ignore
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object put(Object id, Object item, String keyspace) {
|
||||
Assert.notNull(id, "Id must not be null");
|
||||
Assert.notNull(item, "Item must not be null");
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
String key = resolveKey(keyspace, id);
|
||||
State<Object> state = new State<>(key, item, null, CONTENT_TYPE_META, null);
|
||||
SaveStateRequest request = new SaveStateRequest(stateStoreName).setStates(state);
|
||||
|
||||
daprClient.saveBulkState(request).block();
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean contains(Object id, String keyspace) {
|
||||
return get(id, keyspace) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get(Object id, String keyspace) {
|
||||
Assert.notNull(id, "Id must not be null");
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
String key = resolveKey(keyspace, id);
|
||||
|
||||
return resolveValue(daprClient.getState(stateStoreName, key, Object.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T get(Object id, String keyspace, Class<T> type) {
|
||||
Assert.notNull(id, "Id must not be null");
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
|
||||
String key = resolveKey(keyspace, id);
|
||||
GetStateRequest stateRequest = new GetStateRequest(stateStoreName, key).setMetadata(CONTENT_TYPE_META);
|
||||
|
||||
return resolveValue(daprClient.getState(stateRequest, TypeRef.get(type)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object delete(Object id, String keyspace) {
|
||||
Object result = get(id, keyspace);
|
||||
|
||||
if (result == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String key = resolveKey(keyspace, id);
|
||||
|
||||
daprClient.deleteState(stateStoreName, key).block();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T delete(Object id, String keyspace, Class<T> type) {
|
||||
T result = get(id, keyspace, type);
|
||||
|
||||
if (result == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
String key = resolveKey(keyspace, id);
|
||||
|
||||
daprClient.deleteState(stateStoreName, key).block();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<?> getAllOf(String keyspace) {
|
||||
return getAllOf(keyspace, Object.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloseableIterator<Map.Entry<Object, Object>> entries(String keyspace) {
|
||||
throw new UnsupportedOperationException("'entries' method is not supported");
|
||||
}
|
||||
|
||||
private String resolveKey(String keyspace, Object id) {
|
||||
return String.format("%s-%s", keyspace, id);
|
||||
}
|
||||
|
||||
private <T> T resolveValue(Mono<State<T>> state) {
|
||||
if (state == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return state.blockOptional().map(State::getValue).orElse(null);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.client.domain.ComponentMetadata;
|
||||
import io.dapr.client.domain.DaprMetadata;
|
||||
import org.springframework.data.keyvalue.core.KeyValueAdapter;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class DaprKeyValueAdapterResolver implements KeyValueAdapterResolver {
|
||||
private static final Set<String> MYSQL_MARKERS = Set.of("state.mysql-v1", "bindings.mysql-v1");
|
||||
private static final Set<String> POSTGRESQL_MARKERS = Set.of("state.postgresql-v1", "bindings.postgresql-v1");
|
||||
private final DaprClient daprClient;
|
||||
private final ObjectMapper mapper;
|
||||
private final String stateStoreName;
|
||||
private final String bindingName;
|
||||
|
||||
/**
|
||||
* Constructs a {@link DaprKeyValueAdapterResolver}.
|
||||
*
|
||||
* @param daprClient The Dapr client.
|
||||
* @param mapper The object mapper.
|
||||
* @param stateStoreName The state store name.
|
||||
* @param bindingName The binding name.
|
||||
*/
|
||||
public DaprKeyValueAdapterResolver(DaprClient daprClient, ObjectMapper mapper, String stateStoreName,
|
||||
String bindingName) {
|
||||
this.daprClient = daprClient;
|
||||
this.mapper = mapper;
|
||||
this.stateStoreName = stateStoreName;
|
||||
this.bindingName = bindingName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeyValueAdapter resolve() {
|
||||
DaprMetadata metadata = daprClient.getMetadata().block();
|
||||
|
||||
if (metadata == null) {
|
||||
throw new IllegalStateException("No Dapr metadata found");
|
||||
}
|
||||
|
||||
List<ComponentMetadata> components = metadata.getComponents();
|
||||
|
||||
if (components == null || components.isEmpty()) {
|
||||
throw new IllegalStateException("No components found in Dapr metadata");
|
||||
}
|
||||
|
||||
if (shouldUseMySQL(components, stateStoreName, bindingName)) {
|
||||
return new MySQLDaprKeyValueAdapter(daprClient, mapper, stateStoreName, bindingName);
|
||||
}
|
||||
|
||||
if (shouldUsePostgreSQL(components, stateStoreName, bindingName)) {
|
||||
return new PostgreSQLDaprKeyValueAdapter(daprClient, mapper, stateStoreName, bindingName);
|
||||
}
|
||||
|
||||
throw new IllegalStateException("Could find any adapter matching the given state store and binding");
|
||||
}
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
private boolean shouldUseMySQL(List<ComponentMetadata> components, String stateStoreName, String bindingName) {
|
||||
boolean stateStoreMatched = components.stream().anyMatch(x -> matchBy(stateStoreName, MYSQL_MARKERS, x));
|
||||
boolean bindingMatched = components.stream().anyMatch(x -> matchBy(bindingName, MYSQL_MARKERS, x));
|
||||
|
||||
return stateStoreMatched && bindingMatched;
|
||||
}
|
||||
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
private boolean shouldUsePostgreSQL(List<ComponentMetadata> components, String stateStoreName, String bindingName) {
|
||||
boolean stateStoreMatched = components.stream().anyMatch(x -> matchBy(stateStoreName, POSTGRESQL_MARKERS, x));
|
||||
boolean bindingMatched = components.stream().anyMatch(x -> matchBy(bindingName, POSTGRESQL_MARKERS, x));
|
||||
|
||||
return stateStoreMatched && bindingMatched;
|
||||
}
|
||||
|
||||
private boolean matchBy(String name, Set<String> markers, ComponentMetadata componentMetadata) {
|
||||
return componentMetadata.getName().equals(name) && markers.contains(getTypeAndVersion(componentMetadata));
|
||||
}
|
||||
|
||||
private String getTypeAndVersion(ComponentMetadata component) {
|
||||
return component.getType() + "-" + component.getVersion();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,402 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.context.ApplicationEventPublisherAware;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.dao.support.PersistenceExceptionTranslator;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.keyvalue.core.IdentifierGenerator;
|
||||
import org.springframework.data.keyvalue.core.KeyValueAdapter;
|
||||
import org.springframework.data.keyvalue.core.KeyValueCallback;
|
||||
import org.springframework.data.keyvalue.core.KeyValueOperations;
|
||||
import org.springframework.data.keyvalue.core.KeyValuePersistenceExceptionTranslator;
|
||||
import org.springframework.data.keyvalue.core.event.KeyValueEvent;
|
||||
import org.springframework.data.keyvalue.core.mapping.KeyValuePersistentEntity;
|
||||
import org.springframework.data.keyvalue.core.mapping.KeyValuePersistentProperty;
|
||||
import org.springframework.data.keyvalue.core.mapping.context.KeyValueMappingContext;
|
||||
import org.springframework.data.keyvalue.core.query.KeyValueQuery;
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
public class DaprKeyValueTemplate implements KeyValueOperations, ApplicationEventPublisherAware {
|
||||
|
||||
private static final PersistenceExceptionTranslator DEFAULT_PERSISTENCE_EXCEPTION_TRANSLATOR =
|
||||
new KeyValuePersistenceExceptionTranslator();
|
||||
|
||||
private final KeyValueAdapter adapter;
|
||||
private final MappingContext<? extends KeyValuePersistentEntity<?, ?>, ? extends KeyValuePersistentProperty<?>>
|
||||
mappingContext;
|
||||
private final IdentifierGenerator identifierGenerator;
|
||||
|
||||
private PersistenceExceptionTranslator exceptionTranslator = DEFAULT_PERSISTENCE_EXCEPTION_TRANSLATOR;
|
||||
private @Nullable ApplicationEventPublisher eventPublisher;
|
||||
private boolean publishEvents = false;
|
||||
private @SuppressWarnings("rawtypes") Set<Class<? extends KeyValueEvent>> eventTypesToPublish = Collections
|
||||
.emptySet();
|
||||
|
||||
/**
|
||||
* Create new {@link DaprKeyValueTemplate} using the given {@link KeyValueAdapterResolver} with a default
|
||||
* {@link KeyValueMappingContext}.
|
||||
*
|
||||
* @param resolver must not be {@literal null}.
|
||||
*/
|
||||
public DaprKeyValueTemplate(KeyValueAdapterResolver resolver) {
|
||||
this(resolver, new KeyValueMappingContext<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new {@link DaprKeyValueTemplate} using the given {@link KeyValueAdapterResolver} and {@link MappingContext}.
|
||||
*
|
||||
* @param resolver must not be {@literal null}.
|
||||
* @param mappingContext must not be {@literal null}.
|
||||
*/
|
||||
@SuppressWarnings("LineLength")
|
||||
public DaprKeyValueTemplate(KeyValueAdapterResolver resolver,
|
||||
MappingContext<? extends KeyValuePersistentEntity<?, ?>, ? extends KeyValuePersistentProperty<?>> mappingContext) {
|
||||
this(resolver, mappingContext, DefaultIdentifierGenerator.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create new {@link DaprKeyValueTemplate} using the given {@link KeyValueAdapterResolver} and {@link MappingContext}.
|
||||
*
|
||||
* @param resolver must not be {@literal null}.
|
||||
* @param mappingContext must not be {@literal null}.
|
||||
* @param identifierGenerator must not be {@literal null}.
|
||||
*/
|
||||
@SuppressWarnings("LineLength")
|
||||
public DaprKeyValueTemplate(KeyValueAdapterResolver resolver,
|
||||
MappingContext<? extends KeyValuePersistentEntity<?, ?>, ? extends KeyValuePersistentProperty<?>> mappingContext,
|
||||
IdentifierGenerator identifierGenerator) {
|
||||
Assert.notNull(resolver, "Resolver must not be null");
|
||||
Assert.notNull(mappingContext, "MappingContext must not be null");
|
||||
Assert.notNull(identifierGenerator, "IdentifierGenerator must not be null");
|
||||
|
||||
this.adapter = resolver.resolve();
|
||||
this.mappingContext = mappingContext;
|
||||
this.identifierGenerator = identifierGenerator;
|
||||
}
|
||||
|
||||
private static boolean typeCheck(Class<?> requiredType, @Nullable Object candidate) {
|
||||
return candidate == null || ClassUtils.isAssignable(requiredType, candidate.getClass());
|
||||
}
|
||||
|
||||
public void setExceptionTranslator(PersistenceExceptionTranslator exceptionTranslator) {
|
||||
Assert.notNull(exceptionTranslator, "ExceptionTranslator must not be null");
|
||||
this.exceptionTranslator = exceptionTranslator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the {@link ApplicationEventPublisher} to be used to publish {@link KeyValueEvent}s.
|
||||
*
|
||||
* @param eventTypesToPublish must not be {@literal null}.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void setEventTypesToPublish(Set<Class<? extends KeyValueEvent>> eventTypesToPublish) {
|
||||
if (CollectionUtils.isEmpty(eventTypesToPublish)) {
|
||||
this.publishEvents = false;
|
||||
} else {
|
||||
this.publishEvents = true;
|
||||
this.eventTypesToPublish = Collections.unmodifiableSet(eventTypesToPublish);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
|
||||
this.eventPublisher = applicationEventPublisher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T insert(T objectToInsert) {
|
||||
KeyValuePersistentEntity<?, ?> entity = getKeyValuePersistentEntity(objectToInsert);
|
||||
GeneratingIdAccessor generatingIdAccessor = new GeneratingIdAccessor(
|
||||
entity.getPropertyAccessor(objectToInsert),
|
||||
entity.getIdProperty(),
|
||||
identifierGenerator
|
||||
);
|
||||
Object id = generatingIdAccessor.getOrGenerateIdentifier();
|
||||
|
||||
return insert(id, objectToInsert);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T insert(Object id, T objectToInsert) {
|
||||
Assert.notNull(id, "Id for object to be inserted must not be null");
|
||||
Assert.notNull(objectToInsert, "Object to be inserted must not be null");
|
||||
|
||||
String keyspace = resolveKeySpace(objectToInsert.getClass());
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.beforeInsert(id, keyspace, objectToInsert.getClass(), objectToInsert));
|
||||
|
||||
execute((KeyValueCallback<Void>) adapter -> {
|
||||
|
||||
if (adapter.contains(id, keyspace)) {
|
||||
throw new DuplicateKeyException(
|
||||
String.format("Cannot insert existing object with id %s; Please use update", id));
|
||||
}
|
||||
|
||||
adapter.put(id, objectToInsert, keyspace);
|
||||
return null;
|
||||
});
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.afterInsert(id, keyspace, objectToInsert.getClass(), objectToInsert));
|
||||
|
||||
return objectToInsert;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T update(T objectToUpdate) {
|
||||
KeyValuePersistentEntity<?, ?> entity = getKeyValuePersistentEntity(objectToUpdate);
|
||||
|
||||
if (!entity.hasIdProperty()) {
|
||||
throw new InvalidDataAccessApiUsageException(
|
||||
String.format("Cannot determine id for type %s", ClassUtils.getUserClass(objectToUpdate)));
|
||||
}
|
||||
|
||||
return update(entity.getIdentifierAccessor(objectToUpdate).getRequiredIdentifier(), objectToUpdate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T update(Object id, T objectToUpdate) {
|
||||
Assert.notNull(id, "Id for object to be inserted must not be null");
|
||||
Assert.notNull(objectToUpdate, "Object to be updated must not be null");
|
||||
|
||||
String keyspace = resolveKeySpace(objectToUpdate.getClass());
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.beforeUpdate(id, keyspace, objectToUpdate.getClass(), objectToUpdate));
|
||||
|
||||
Object existing = execute(adapter -> adapter.put(id, objectToUpdate, keyspace));
|
||||
|
||||
potentiallyPublishEvent(
|
||||
KeyValueEvent.afterUpdate(id, keyspace, objectToUpdate.getClass(), objectToUpdate, existing));
|
||||
|
||||
return objectToUpdate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Optional<T> findById(Object id, Class<T> type) {
|
||||
Assert.notNull(id, "Id for object to be found must not be null");
|
||||
Assert.notNull(type, "Type to fetch must not be null");
|
||||
|
||||
String keyspace = resolveKeySpace(type);
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.beforeGet(id, keyspace, type));
|
||||
|
||||
T result = execute(adapter -> {
|
||||
Object value = adapter.get(id, keyspace, type);
|
||||
|
||||
if (value == null || typeCheck(type, value)) {
|
||||
return type.cast(value);
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.afterGet(id, keyspace, type, result));
|
||||
|
||||
return Optional.ofNullable(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(Class<?> type) {
|
||||
Assert.notNull(type, "Type to delete must not be null");
|
||||
|
||||
String keyspace = resolveKeySpace(type);
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.beforeDropKeySpace(keyspace, type));
|
||||
|
||||
execute((KeyValueCallback<Void>) adapter -> {
|
||||
|
||||
adapter.deleteAllOf(keyspace);
|
||||
return null;
|
||||
});
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.afterDropKeySpace(keyspace, type));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> T delete(T objectToDelete) {
|
||||
Class<T> type = (Class<T>) ClassUtils.getUserClass(objectToDelete);
|
||||
KeyValuePersistentEntity<?, ?> entity = getKeyValuePersistentEntity(objectToDelete);
|
||||
Object id = entity.getIdentifierAccessor(objectToDelete).getIdentifier();
|
||||
|
||||
if (id == null) {
|
||||
String error = String.format("Cannot determine id for type %s", ClassUtils.getUserClass(objectToDelete));
|
||||
|
||||
throw new InvalidDataAccessApiUsageException(error);
|
||||
}
|
||||
|
||||
return delete(id, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T delete(Object id, Class<T> type) {
|
||||
Assert.notNull(id, "Id for object to be deleted must not be null");
|
||||
Assert.notNull(type, "Type to delete must not be null");
|
||||
|
||||
String keyspace = resolveKeySpace(type);
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.beforeDelete(id, keyspace, type));
|
||||
|
||||
T result = execute(adapter -> adapter.delete(id, keyspace, type));
|
||||
|
||||
potentiallyPublishEvent(KeyValueEvent.afterDelete(id, keyspace, type, result));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> T execute(KeyValueCallback<T> action) {
|
||||
Assert.notNull(action, "KeyValueCallback must not be null");
|
||||
|
||||
try {
|
||||
return action.doInKeyValue(this.adapter);
|
||||
} catch (RuntimeException e) {
|
||||
throw resolveExceptionIfPossible(e);
|
||||
}
|
||||
}
|
||||
|
||||
protected <T> T executeRequired(KeyValueCallback<T> action) {
|
||||
T result = execute(action);
|
||||
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
throw new IllegalStateException(String.format("KeyValueCallback %s returned null value", action));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Iterable<T> find(KeyValueQuery<?> query, Class<T> type) {
|
||||
return executeRequired((KeyValueCallback<Iterable<T>>) adapter -> {
|
||||
Iterable<?> result = adapter.find(query, resolveKeySpace(type), type);
|
||||
|
||||
List<T> filtered = new ArrayList<>();
|
||||
|
||||
for (Object candidate : result) {
|
||||
if (typeCheck(type, candidate)) {
|
||||
filtered.add(type.cast(candidate));
|
||||
}
|
||||
}
|
||||
|
||||
return filtered;
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Class<T> type) {
|
||||
Assert.notNull(type, "Type to fetch must not be null");
|
||||
|
||||
return executeRequired(adapter -> {
|
||||
Iterable<?> values = adapter.getAllOf(resolveKeySpace(type), type);
|
||||
|
||||
ArrayList<T> filtered = new ArrayList<>();
|
||||
for (Object candidate : values) {
|
||||
if (typeCheck(type, candidate)) {
|
||||
filtered.add(type.cast(candidate));
|
||||
}
|
||||
}
|
||||
|
||||
return filtered;
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public <T> Iterable<T> findAll(Sort sort, Class<T> type) {
|
||||
return find(new KeyValueQuery(sort), type);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public <T> Iterable<T> findInRange(long offset, int rows, Class<T> type) {
|
||||
return find(new KeyValueQuery().skip(offset).limit(rows), type);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public <T> Iterable<T> findInRange(long offset, int rows, Sort sort, Class<T> type) {
|
||||
return find(new KeyValueQuery(sort).skip(offset).limit(rows), type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long count(Class<?> type) {
|
||||
Assert.notNull(type, "Type for count must not be null");
|
||||
return adapter.count(resolveKeySpace(type));
|
||||
}
|
||||
|
||||
@Override
|
||||
public long count(KeyValueQuery<?> query, Class<?> type) {
|
||||
return executeRequired(adapter -> adapter.count(query, resolveKeySpace(type)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean exists(KeyValueQuery<?> query, Class<?> type) {
|
||||
return executeRequired(adapter -> adapter.exists(query, resolveKeySpace(type)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public MappingContext<?, ?> getMappingContext() {
|
||||
return this.mappingContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeyValueAdapter getKeyValueAdapter() {
|
||||
return adapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() throws Exception {
|
||||
this.adapter.destroy();
|
||||
}
|
||||
|
||||
private KeyValuePersistentEntity<?, ?> getKeyValuePersistentEntity(Object objectToInsert) {
|
||||
return this.mappingContext.getRequiredPersistentEntity(ClassUtils.getUserClass(objectToInsert));
|
||||
}
|
||||
|
||||
private String resolveKeySpace(Class<?> type) {
|
||||
return this.mappingContext.getRequiredPersistentEntity(type).getKeySpace();
|
||||
}
|
||||
|
||||
private RuntimeException resolveExceptionIfPossible(RuntimeException e) {
|
||||
DataAccessException translatedException = exceptionTranslator.translateExceptionIfPossible(e);
|
||||
|
||||
return translatedException != null ? translatedException : e;
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private void potentiallyPublishEvent(KeyValueEvent event) {
|
||||
if (eventPublisher == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (publishEvents && (eventTypesToPublish.isEmpty() || eventTypesToPublish.contains(event.getClass()))) {
|
||||
eventPublisher.publishEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.keyvalue.core.IdentifierGenerator;
|
||||
import org.springframework.data.util.TypeInformation;
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link IdentifierGenerator} to generate identifiers of types {@link UUID}.
|
||||
*/
|
||||
enum DefaultIdentifierGenerator implements IdentifierGenerator {
|
||||
|
||||
INSTANCE;
|
||||
|
||||
private final AtomicReference<SecureRandom> secureRandom = new AtomicReference<>(null);
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T generateIdentifierOfType(TypeInformation<T> identifierType) {
|
||||
|
||||
Class<?> type = identifierType.getType();
|
||||
|
||||
if (ClassUtils.isAssignable(UUID.class, type)) {
|
||||
return (T) UUID.randomUUID();
|
||||
} else if (ClassUtils.isAssignable(String.class, type)) {
|
||||
return (T) UUID.randomUUID().toString();
|
||||
} else if (ClassUtils.isAssignable(Integer.class, type)) {
|
||||
return (T) Integer.valueOf(getSecureRandom().nextInt());
|
||||
} else if (ClassUtils.isAssignable(Long.class, type)) {
|
||||
return (T) Long.valueOf(getSecureRandom().nextLong());
|
||||
}
|
||||
|
||||
throw new InvalidDataAccessApiUsageException(
|
||||
String.format("Identifier cannot be generated for %s; Supported types are: UUID, String, Integer, and Long",
|
||||
identifierType.getType().getName()));
|
||||
}
|
||||
|
||||
private SecureRandom getSecureRandom() {
|
||||
|
||||
SecureRandom secureRandom = this.secureRandom.get();
|
||||
if (secureRandom != null) {
|
||||
return secureRandom;
|
||||
}
|
||||
|
||||
for (String algorithm : OsTools.secureRandomAlgorithmNames()) {
|
||||
try {
|
||||
secureRandom = SecureRandom.getInstance(algorithm);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
// ignore and try next.
|
||||
}
|
||||
}
|
||||
|
||||
if (secureRandom == null) {
|
||||
throw new InvalidDataAccessApiUsageException(
|
||||
String.format("Could not create SecureRandom instance for one of the algorithms '%s'",
|
||||
StringUtils.collectionToCommaDelimitedString(OsTools.secureRandomAlgorithmNames())));
|
||||
}
|
||||
|
||||
this.secureRandom.compareAndSet(null, secureRandom);
|
||||
|
||||
return secureRandom;
|
||||
}
|
||||
|
||||
private static class OsTools {
|
||||
|
||||
private static final String OPERATING_SYSTEM_NAME = System.getProperty("os.name").toLowerCase();
|
||||
|
||||
private static final List<String> SECURE_RANDOM_ALGORITHMS_LINUX_OSX_SOLARIS = Arrays.asList("NativePRNGBlocking",
|
||||
"NativePRNGNonBlocking", "NativePRNG", "SHA1PRNG");
|
||||
private static final List<String> SECURE_RANDOM_ALGORITHMS_WINDOWS = Arrays.asList("SHA1PRNG", "Windows-PRNG");
|
||||
|
||||
static List<String> secureRandomAlgorithmNames() {
|
||||
return OPERATING_SYSTEM_NAME.contains("win") ? SECURE_RANDOM_ALGORITHMS_WINDOWS
|
||||
: SECURE_RANDOM_ALGORITHMS_LINUX_OSX_SOLARIS;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import org.springframework.data.keyvalue.core.IdentifierGenerator;
|
||||
import org.springframework.data.mapping.IdentifierAccessor;
|
||||
import org.springframework.data.mapping.PersistentProperty;
|
||||
import org.springframework.data.mapping.PersistentPropertyAccessor;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* {@link IdentifierAccessor} adding a {@link #getOrGenerateIdentifier()} to automatically generate an identifier and
|
||||
* set it on the underling bean instance.
|
||||
*
|
||||
* @see #getOrGenerateIdentifier()
|
||||
*/
|
||||
class GeneratingIdAccessor implements IdentifierAccessor {
|
||||
|
||||
private final PersistentPropertyAccessor<?> accessor;
|
||||
private final PersistentProperty<?> identifierProperty;
|
||||
private final IdentifierGenerator generator;
|
||||
|
||||
/**
|
||||
* Creates a new {@link GeneratingIdAccessor} using the given {@link PersistentPropertyAccessor}, identifier property
|
||||
* and {@link IdentifierGenerator}.
|
||||
*
|
||||
* @param accessor must not be {@literal null}.
|
||||
* @param identifierProperty must not be {@literal null}.
|
||||
* @param generator must not be {@literal null}.
|
||||
*/
|
||||
GeneratingIdAccessor(PersistentPropertyAccessor<?> accessor, PersistentProperty<?> identifierProperty,
|
||||
IdentifierGenerator generator) {
|
||||
|
||||
Assert.notNull(accessor, "PersistentPropertyAccessor must not be null");
|
||||
Assert.notNull(identifierProperty, "Identifier property must not be null");
|
||||
Assert.notNull(generator, "IdentifierGenerator must not be null");
|
||||
|
||||
this.accessor = accessor;
|
||||
this.identifierProperty = identifierProperty;
|
||||
this.generator = generator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getIdentifier() {
|
||||
return accessor.getProperty(identifierProperty);
|
||||
}
|
||||
|
||||
Object getOrGenerateIdentifier() {
|
||||
|
||||
Object existingIdentifier = getIdentifier();
|
||||
|
||||
if (existingIdentifier != null) {
|
||||
return existingIdentifier;
|
||||
}
|
||||
|
||||
Object generatedIdentifier = generator.generateIdentifierOfType(identifierProperty.getTypeInformation());
|
||||
accessor.setProperty(identifierProperty, generatedIdentifier);
|
||||
|
||||
return generatedIdentifier;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import org.springframework.data.keyvalue.core.KeyValueAdapter;
|
||||
|
||||
public interface KeyValueAdapterResolver {
|
||||
KeyValueAdapter resolve();
|
||||
}
|
|
@ -0,0 +1,223 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonPointer;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.utils.TypeRef;
|
||||
import org.springframework.data.keyvalue.core.query.KeyValueQuery;
|
||||
import org.springframework.expression.spel.SpelNode;
|
||||
import org.springframework.expression.spel.standard.SpelExpression;
|
||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.Base64;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A {@link org.springframework.data.keyvalue.core.KeyValueAdapter} implementation for MySQL.
|
||||
*/
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class MySQLDaprKeyValueAdapter extends AbstractDaprKeyValueAdapter {
|
||||
private static final String DELETE_BY_KEYSPACE_PATTERN = "delete from state where id LIKE '%s'";
|
||||
private static final String SELECT_BY_KEYSPACE_PATTERN = "select value from state where id LIKE '%s'";
|
||||
private static final String SELECT_BY_FILTER_PATTERN =
|
||||
"select value from state where id LIKE '%s' and JSON_EXTRACT(value, %s) = %s";
|
||||
private static final String COUNT_BY_KEYSPACE_PATTERN = "select count(*) as value from state where id LIKE '%s'";
|
||||
private static final String COUNT_BY_FILTER_PATTERN =
|
||||
"select count(*) as value from state where id LIKE '%s' and JSON_EXTRACT(value, %s) = %s";
|
||||
|
||||
private static final TypeRef<List<JsonNode>> FILTER_TYPE_REF = new TypeRef<>() {
|
||||
};
|
||||
private static final TypeRef<List<JsonNode>> COUNT_TYPE_REF = new TypeRef<>() {
|
||||
};
|
||||
private static final SpelExpressionParser PARSER = new SpelExpressionParser();
|
||||
private static final JsonPointer VALUE_POINTER = JsonPointer.compile("/value");
|
||||
|
||||
private final DaprClient daprClient;
|
||||
private final ObjectMapper mapper;
|
||||
private final String stateStoreName;
|
||||
private final String bindingName;
|
||||
|
||||
/**
|
||||
* Constructs a {@link MySQLDaprKeyValueAdapter}.
|
||||
*
|
||||
* @param daprClient The Dapr client.
|
||||
* @param mapper The object mapper.
|
||||
* @param stateStoreName The state store name.
|
||||
* @param bindingName The binding name.
|
||||
*/
|
||||
public MySQLDaprKeyValueAdapter(DaprClient daprClient, ObjectMapper mapper, String stateStoreName,
|
||||
String bindingName) {
|
||||
super(daprClient, stateStoreName);
|
||||
|
||||
Assert.notNull(mapper, "ObjectMapper must not be null");
|
||||
Assert.hasText(bindingName, "State store binding must not be empty");
|
||||
|
||||
this.daprClient = daprClient;
|
||||
this.mapper = mapper;
|
||||
this.stateStoreName = stateStoreName;
|
||||
this.bindingName = bindingName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Iterable<T> getAllOf(String keyspace, Class<T> type) {
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
|
||||
String sql = createSql(SELECT_BY_KEYSPACE_PATTERN, keyspace);
|
||||
List<JsonNode> result = queryUsingBinding(sql, FILTER_TYPE_REF);
|
||||
|
||||
return convertValues(result, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllOf(String keyspace) {
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
String sql = createSql(DELETE_BY_KEYSPACE_PATTERN, keyspace);
|
||||
|
||||
execUsingBinding(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Iterable<T> find(KeyValueQuery<?> query, String keyspace, Class<T> type) {
|
||||
Assert.notNull(query, "Query must not be null");
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
|
||||
Object criteria = query.getCriteria();
|
||||
|
||||
if (criteria == null) {
|
||||
return getAllOf(keyspace, type);
|
||||
}
|
||||
|
||||
String sql = createSql(SELECT_BY_FILTER_PATTERN, keyspace, criteria);
|
||||
List<JsonNode> result = queryUsingBinding(sql, FILTER_TYPE_REF);
|
||||
|
||||
return convertValues(result, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long count(String keyspace) {
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
String sql = createSql(COUNT_BY_KEYSPACE_PATTERN, keyspace);
|
||||
List<JsonNode> result = queryUsingBinding(sql, COUNT_TYPE_REF);
|
||||
|
||||
return extractCount(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long count(KeyValueQuery<?> query, String keyspace) {
|
||||
Assert.notNull(query, "Query must not be null");
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
Object criteria = query.getCriteria();
|
||||
|
||||
if (criteria == null) {
|
||||
return count(keyspace);
|
||||
}
|
||||
|
||||
String sql = createSql(COUNT_BY_FILTER_PATTERN, keyspace, criteria);
|
||||
List<JsonNode> result = queryUsingBinding(sql, COUNT_TYPE_REF);
|
||||
|
||||
return extractCount(result);
|
||||
}
|
||||
|
||||
private String getKeyspaceFilter(String keyspace) {
|
||||
return String.format("%s||%s-%%", stateStoreName, keyspace);
|
||||
}
|
||||
|
||||
private String createSql(String sqlPattern, String keyspace) {
|
||||
String keyspaceFilter = getKeyspaceFilter(keyspace);
|
||||
|
||||
return String.format(sqlPattern, keyspaceFilter);
|
||||
}
|
||||
|
||||
private String createSql(String sqlPattern, String keyspace, Object criteria) {
|
||||
String keyspaceFilter = getKeyspaceFilter(keyspace);
|
||||
SpelExpression expression = PARSER.parseRaw(criteria.toString());
|
||||
SpelNode leftNode = expression.getAST().getChild(0);
|
||||
SpelNode rightNode = expression.getAST().getChild(1);
|
||||
String left = String.format("'$.%s'", leftNode.toStringAST());
|
||||
String right = rightNode.toStringAST();
|
||||
|
||||
return String.format(sqlPattern, keyspaceFilter, left, right);
|
||||
}
|
||||
|
||||
private void execUsingBinding(String sql) {
|
||||
Map<String, String> meta = Map.of("sql", sql);
|
||||
|
||||
daprClient.invokeBinding(bindingName, "exec", null, meta).block();
|
||||
}
|
||||
|
||||
private <T> T queryUsingBinding(String sql, TypeRef<T> typeRef) {
|
||||
Map<String, String> meta = Map.of("sql", sql);
|
||||
|
||||
return daprClient.invokeBinding(bindingName, "query", null, meta, typeRef).block();
|
||||
}
|
||||
|
||||
private <T> List<T> convertValues(List<JsonNode> values, Class<T> type) {
|
||||
if (values == null || values.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return values.stream()
|
||||
.map(value -> convertValue(value, type))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private <T> T convertValue(JsonNode value, Class<T> type) {
|
||||
JsonNode valueNode = value.at(VALUE_POINTER);
|
||||
|
||||
if (valueNode.isMissingNode()) {
|
||||
throw new IllegalStateException("Value is missing");
|
||||
}
|
||||
|
||||
try {
|
||||
// The value is stored as a base64 encoded string and wrapped in quotes
|
||||
// hence we need to remove the quotes and then decode
|
||||
String rawValue = valueNode.toString().replace("\"", "");
|
||||
byte[] decodedValue = Base64.getDecoder().decode(rawValue);
|
||||
|
||||
return mapper.readValue(decodedValue, type);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private long extractCount(List<JsonNode> values) {
|
||||
if (values == null || values.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
JsonNode valueNode = values.get(0).at(VALUE_POINTER);
|
||||
|
||||
if (valueNode.isMissingNode()) {
|
||||
throw new IllegalStateException("Count value is missing");
|
||||
}
|
||||
|
||||
if (!valueNode.isNumber()) {
|
||||
throw new IllegalStateException("Count value is not a number");
|
||||
}
|
||||
|
||||
return valueNode.asLong();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,216 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.spring.data.repository.query.DaprPredicate;
|
||||
import io.dapr.utils.TypeRef;
|
||||
import org.springframework.data.keyvalue.core.query.KeyValueQuery;
|
||||
import org.springframework.expression.spel.SpelNode;
|
||||
import org.springframework.expression.spel.standard.SpelExpression;
|
||||
import org.springframework.expression.spel.standard.SpelExpressionParser;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A {@link org.springframework.data.keyvalue.core.KeyValueAdapter} implementation for PostgreSQL.
|
||||
*/
|
||||
@SuppressWarnings("AbbreviationAsWordInName")
|
||||
public class PostgreSQLDaprKeyValueAdapter extends AbstractDaprKeyValueAdapter {
|
||||
private static final String DELETE_BY_KEYSPACE_PATTERN = "delete from state where key LIKE '%s'";
|
||||
private static final String SELECT_BY_KEYSPACE_PATTERN = "select value from state where key LIKE '%s'";
|
||||
private static final String SELECT_BY_FILTER_PATTERN =
|
||||
"select value from state where key LIKE '%s' and JSONB_EXTRACT_PATH_TEXT(value, %s) = %s";
|
||||
private static final String COUNT_BY_KEYSPACE_PATTERN = "select count(*) as value from state where key LIKE '%s'";
|
||||
private static final String COUNT_BY_FILTER_PATTERN =
|
||||
"select count(*) as value from state where key LIKE '%s' and JSONB_EXTRACT_PATH_TEXT(value, %s) = %s";
|
||||
|
||||
private static final TypeRef<List<List<Object>>> FILTER_TYPE_REF = new TypeRef<>() {
|
||||
};
|
||||
private static final TypeRef<List<List<Long>>> COUNT_TYPE_REF = new TypeRef<>() {
|
||||
};
|
||||
private static final SpelExpressionParser PARSER = new SpelExpressionParser();
|
||||
|
||||
private final DaprClient daprClient;
|
||||
private final ObjectMapper mapper;
|
||||
private final String stateStoreName;
|
||||
private final String bindingName;
|
||||
|
||||
/**
|
||||
* Constructs a {@link PostgreSQLDaprKeyValueAdapter}.
|
||||
*
|
||||
* @param daprClient The Dapr client.
|
||||
* @param mapper The object mapper.
|
||||
* @param stateStoreName The state store name.
|
||||
* @param bindingName The binding name.
|
||||
*/
|
||||
public PostgreSQLDaprKeyValueAdapter(DaprClient daprClient, ObjectMapper mapper, String stateStoreName,
|
||||
String bindingName) {
|
||||
super(daprClient, stateStoreName);
|
||||
|
||||
Assert.notNull(mapper, "ObjectMapper must not be null");
|
||||
Assert.hasText(bindingName, "State store binding must not be empty");
|
||||
|
||||
this.daprClient = daprClient;
|
||||
this.mapper = mapper;
|
||||
this.stateStoreName = stateStoreName;
|
||||
this.bindingName = bindingName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Iterable<T> getAllOf(String keyspace, Class<T> type) {
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
|
||||
String sql = createSql(SELECT_BY_KEYSPACE_PATTERN, keyspace);
|
||||
List<List<Object>> result = queryUsingBinding(sql, FILTER_TYPE_REF);
|
||||
|
||||
return convertValues(result, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllOf(String keyspace) {
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
String sql = createSql(DELETE_BY_KEYSPACE_PATTERN, keyspace);
|
||||
|
||||
execUsingBinding(sql);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Iterable<T> find(KeyValueQuery<?> query, String keyspace, Class<T> type) {
|
||||
Assert.notNull(query, "Query must not be null");
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
|
||||
Object criteria = query.getCriteria();
|
||||
|
||||
if (criteria == null) {
|
||||
return getAllOf(keyspace, type);
|
||||
}
|
||||
|
||||
String sql = createSql(SELECT_BY_FILTER_PATTERN, keyspace, criteria);
|
||||
List<List<Object>> result = queryUsingBinding(sql, FILTER_TYPE_REF);
|
||||
|
||||
return convertValues(result, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long count(String keyspace) {
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
String sql = createSql(COUNT_BY_KEYSPACE_PATTERN, keyspace);
|
||||
List<List<Long>> result = queryUsingBinding(sql, COUNT_TYPE_REF);
|
||||
|
||||
return extractCount(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long count(KeyValueQuery<?> query, String keyspace) {
|
||||
Assert.notNull(query, "Query must not be null");
|
||||
Assert.hasText(keyspace, "Keyspace must not be empty");
|
||||
|
||||
Object criteria = query.getCriteria();
|
||||
|
||||
if (criteria == null) {
|
||||
return count(keyspace);
|
||||
}
|
||||
|
||||
String sql = createSql(COUNT_BY_FILTER_PATTERN, keyspace, criteria);
|
||||
List<List<Long>> result = queryUsingBinding(sql, COUNT_TYPE_REF);
|
||||
|
||||
return extractCount(result);
|
||||
}
|
||||
|
||||
private String getKeyspaceFilter(String keyspace) {
|
||||
return String.format("%s||%s-%%", stateStoreName, keyspace);
|
||||
}
|
||||
|
||||
private String createSql(String sqlPattern, String keyspace) {
|
||||
String keyspaceFilter = getKeyspaceFilter(keyspace);
|
||||
|
||||
return String.format(sqlPattern, keyspaceFilter);
|
||||
}
|
||||
|
||||
private String createSql(String sqlPattern, String keyspace, Object criteria) {
|
||||
String keyspaceFilter = getKeyspaceFilter(keyspace);
|
||||
|
||||
if (criteria instanceof DaprPredicate) {
|
||||
var daprPredicate = (DaprPredicate) criteria;
|
||||
String path = daprPredicate.getPath().toString();
|
||||
String pathWithOutType = String.format("'%s'", path.substring(path.indexOf(".") + 1));
|
||||
String value = String.format("'%s'", daprPredicate.getValue().toString());
|
||||
|
||||
return String.format(sqlPattern, keyspaceFilter, pathWithOutType, value);
|
||||
} else if (criteria instanceof String) {
|
||||
SpelExpression expression = PARSER.parseRaw(criteria.toString());
|
||||
SpelNode leftNode = expression.getAST().getChild(0);
|
||||
SpelNode rightNode = expression.getAST().getChild(1);
|
||||
String left = String.format("'%s'", leftNode.toStringAST());
|
||||
String right = rightNode.toStringAST();
|
||||
|
||||
return String.format(sqlPattern, keyspaceFilter, left, right);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void execUsingBinding(String sql) {
|
||||
Map<String, String> meta = Map.of("sql", sql);
|
||||
|
||||
daprClient.invokeBinding(bindingName, "exec", null, meta).block();
|
||||
}
|
||||
|
||||
private <T> T queryUsingBinding(String sql, TypeRef<T> typeRef) {
|
||||
Map<String, String> meta = Map.of("sql", sql);
|
||||
|
||||
return daprClient.invokeBinding(bindingName, "query", null, meta, typeRef).block();
|
||||
}
|
||||
|
||||
private <T> Iterable<T> convertValues(List<List<Object>> values, Class<T> type) {
|
||||
if (values == null || values.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return values.stream()
|
||||
.flatMap(Collection::stream)
|
||||
.map(value -> convertValue(value, type))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private <T> T convertValue(Object value, Class<T> type) {
|
||||
try {
|
||||
return mapper.convertValue(value, type);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private long extractCount(List<List<Long>> values) {
|
||||
if (values == null || values.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return values.stream()
|
||||
.flatMap(Collection::stream)
|
||||
.collect(Collectors.toList())
|
||||
.get(0);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data.repository.config;
|
||||
|
||||
import org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport;
|
||||
import org.springframework.data.repository.config.RepositoryConfigurationExtension;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
/**
|
||||
* Dapr specific {@link RepositoryBeanDefinitionRegistrarSupport} implementation.
|
||||
*/
|
||||
public class DaprRepositoriesRegistrar extends RepositoryBeanDefinitionRegistrarSupport {
|
||||
|
||||
@Override
|
||||
protected Class<? extends Annotation> getAnnotation() {
|
||||
return EnableDaprRepositories.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RepositoryConfigurationExtension getExtension() {
|
||||
return new DaprRepositoryConfigurationExtension();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data.repository.config;
|
||||
|
||||
import org.springframework.data.keyvalue.repository.config.KeyValueRepositoryConfigurationExtension;
|
||||
import org.springframework.data.repository.config.RepositoryConfigurationExtension;
|
||||
|
||||
/**
|
||||
* {@link RepositoryConfigurationExtension} for Dapr-based repositories.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class DaprRepositoryConfigurationExtension extends KeyValueRepositoryConfigurationExtension {
|
||||
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return "Dapr";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getModulePrefix() {
|
||||
return "dapr";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultKeyValueTemplateRef() {
|
||||
return "daprKeyValueTemplate";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data.repository.config;
|
||||
|
||||
import io.dapr.spring.data.repository.query.DaprPredicateQueryCreator;
|
||||
import org.springframework.beans.factory.FactoryBean;
|
||||
import org.springframework.context.annotation.ComponentScan.Filter;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.data.keyvalue.core.KeyValueOperations;
|
||||
import org.springframework.data.keyvalue.repository.config.QueryCreatorType;
|
||||
import org.springframework.data.keyvalue.repository.support.KeyValueRepositoryFactoryBean;
|
||||
import org.springframework.data.repository.config.DefaultRepositoryBaseClass;
|
||||
import org.springframework.data.repository.query.QueryLookupStrategy;
|
||||
import org.springframework.data.repository.query.QueryLookupStrategy.Key;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Inherited;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Annotation to activate Dapr repositories. If no base package is configured through either {@link #value()},
|
||||
* {@link #basePackages()} or {@link #basePackageClasses()} it will trigger scanning of the package of annotated class.
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Inherited
|
||||
@Import(DaprRepositoriesRegistrar.class)
|
||||
@QueryCreatorType(DaprPredicateQueryCreator.class)
|
||||
public @interface EnableDaprRepositories {
|
||||
|
||||
/**
|
||||
* Alias for the {@link #basePackages()} attribute. Allows for more concise annotation declarations e.g.:
|
||||
* {@code @EnableJpaRepositories("org.my.pkg")} instead of {@code @EnableJpaRepositories(basePackages="org.my.pkg")}.
|
||||
*
|
||||
* @return alias of the base package
|
||||
*/
|
||||
String[] value() default {};
|
||||
|
||||
/**
|
||||
* Base packages to scan for annotated components. {@link #value()} is an alias for (and mutually exclusive with) this
|
||||
* attribute. Use {@link #basePackageClasses()} for a type-safe alternative to String-based package names.
|
||||
*
|
||||
* @return array of base packages
|
||||
*/
|
||||
String[] basePackages() default {};
|
||||
|
||||
/**
|
||||
* Type-safe alternative to {@link #basePackages()} for specifying the packages to scan for annotated components. The
|
||||
* package of each class specified will be scanned. Consider creating a special no-op marker class or interface in
|
||||
* each package that serves no purpose other than being referenced by this attribute.
|
||||
*
|
||||
* @return array of base classes
|
||||
*/
|
||||
Class<?>[] basePackageClasses() default {};
|
||||
|
||||
/**
|
||||
* Specifies which types are not eligible for component scanning.
|
||||
*
|
||||
* @return array of exclusion filters
|
||||
*/
|
||||
Filter[] excludeFilters() default {};
|
||||
|
||||
/**
|
||||
* Specifies which types are eligible for component scanning. Further narrows the set of candidate components from
|
||||
* everything in {@link #basePackages()} to everything in the base packages that matches the given filter or filters.
|
||||
*
|
||||
* @return array of inclusion filters
|
||||
*/
|
||||
Filter[] includeFilters() default {};
|
||||
|
||||
/**
|
||||
* Returns the postfix to be used when looking up custom repository implementations. Defaults to {@literal Impl}. So
|
||||
* for a repository named {@code PersonRepository} the corresponding implementation class will be looked up scanning
|
||||
* for {@code PersonRepositoryImpl}.
|
||||
*
|
||||
* @return repository implementation post fix
|
||||
*/
|
||||
String repositoryImplementationPostfix() default "Impl";
|
||||
|
||||
/**
|
||||
* Configures the location of where to find the Spring Data named queries properties file.
|
||||
*
|
||||
* @return named queries location
|
||||
*/
|
||||
String namedQueriesLocation() default "";
|
||||
|
||||
/**
|
||||
* Returns the key of the {@link QueryLookupStrategy} to be used for lookup queries for query methods. Defaults to
|
||||
* {@link Key#CREATE_IF_NOT_FOUND}.
|
||||
*
|
||||
* @return key lookup strategy
|
||||
*/
|
||||
Key queryLookupStrategy() default Key.CREATE_IF_NOT_FOUND;
|
||||
|
||||
/**
|
||||
* Returns the {@link FactoryBean} class to be used for each repository instance. Defaults to
|
||||
* {@link KeyValueRepositoryFactoryBean}.
|
||||
*
|
||||
* @return repository factory bean class
|
||||
*/
|
||||
Class<?> repositoryFactoryBeanClass() default KeyValueRepositoryFactoryBean.class;
|
||||
|
||||
/**
|
||||
* Configure the repository base class to be used to create repository proxies for this particular configuration.
|
||||
*
|
||||
* @return repository base class
|
||||
*/
|
||||
Class<?> repositoryBaseClass() default DefaultRepositoryBaseClass.class;
|
||||
|
||||
/**
|
||||
* Configures the name of the {@link KeyValueOperations} bean to be used with the repositories detected.
|
||||
*
|
||||
* @return the Key value template bean name
|
||||
*/
|
||||
String keyValueTemplateRef() default "daprKeyValueTemplate";
|
||||
|
||||
/**
|
||||
* Configures whether nested repository-interfaces (e.g. defined as inner classes) should be discovered by the
|
||||
* repositories infrastructure.
|
||||
*
|
||||
* @return whether to consider nested repository interfaces
|
||||
*/
|
||||
boolean considerNestedRepositories() default false;
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Copyright 2021 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data.repository.query;
|
||||
|
||||
import org.springframework.beans.BeanWrapper;
|
||||
import org.springframework.data.mapping.PropertyPath;
|
||||
import org.springframework.data.util.DirectFieldAccessFallbackBeanWrapper;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class DaprPredicate implements Predicate<Object> {
|
||||
|
||||
private final PropertyPath path;
|
||||
private final Function<Object, Boolean> check;
|
||||
private final Object value;
|
||||
|
||||
public DaprPredicate(PropertyPath path, Object expected) {
|
||||
this(path, expected, (valueToCompare) -> ObjectUtils.nullSafeEquals(valueToCompare, expected));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new {@link DaprPredicate}.
|
||||
*
|
||||
* @param path The path to the property to compare.
|
||||
* @param value The value to compare.
|
||||
* @param check The function to check the value.
|
||||
*/
|
||||
public DaprPredicate(PropertyPath path, Object value, Function<Object, Boolean> check) {
|
||||
this.path = path;
|
||||
this.check = check;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public PropertyPath getPath() {
|
||||
return path;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean test(Object o) {
|
||||
Object value = getValueByPath(o, path);
|
||||
return check.apply(value);
|
||||
}
|
||||
|
||||
private Object getValueByPath(Object root, PropertyPath path) {
|
||||
Object currentValue = root;
|
||||
|
||||
for (PropertyPath currentPath : path) {
|
||||
currentValue = wrap(currentValue).getPropertyValue(currentPath.getSegment());
|
||||
|
||||
if (currentValue == null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return currentValue;
|
||||
}
|
||||
|
||||
private BeanWrapper wrap(Object o) {
|
||||
return new DirectFieldAccessFallbackBeanWrapper(o);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,182 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data.repository.query;
|
||||
|
||||
import org.springframework.data.repository.query.parser.Part;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.util.comparator.Comparators;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
class DaprPredicateBuilder {
|
||||
|
||||
private final Part part;
|
||||
|
||||
private DaprPredicateBuilder(Part part) {
|
||||
this.part = part;
|
||||
}
|
||||
|
||||
static DaprPredicateBuilder propertyValueOf(Part part) {
|
||||
return new DaprPredicateBuilder(part);
|
||||
}
|
||||
|
||||
Predicate<Object> isTrue() {
|
||||
return new DaprPredicate(part.getProperty(), true);
|
||||
}
|
||||
|
||||
public Predicate<Object> isFalse() {
|
||||
return new DaprPredicate(part.getProperty(), false);
|
||||
}
|
||||
|
||||
public Predicate<Object> isEqualTo(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> {
|
||||
if (!ObjectUtils.nullSafeEquals(Part.IgnoreCaseType.NEVER, part.shouldIgnoreCase())) {
|
||||
if ((o instanceof String) && (value instanceof String)) {
|
||||
var s1 = (String)o;
|
||||
var s2 = (String)value;
|
||||
return s1.equalsIgnoreCase(s2);
|
||||
}
|
||||
}
|
||||
|
||||
return ObjectUtils.nullSafeEquals(o, value);
|
||||
});
|
||||
}
|
||||
|
||||
public Predicate<Object> isNull() {
|
||||
return new DaprPredicate(part.getProperty(), null, Objects::isNull);
|
||||
}
|
||||
|
||||
public Predicate<Object> isNotNull() {
|
||||
return isNull().negate();
|
||||
}
|
||||
|
||||
public Predicate<Object> isLessThan(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> Comparators.nullsHigh().compare(o, value) < 0);
|
||||
}
|
||||
|
||||
public Predicate<Object> isLessThanEqual(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> Comparators.nullsHigh().compare(o, value) <= 0);
|
||||
}
|
||||
|
||||
public Predicate<Object> isGreaterThan(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> Comparators.nullsHigh().compare(o, value) > 0);
|
||||
}
|
||||
|
||||
public Predicate<Object> isGreaterThanEqual(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> Comparators.nullsHigh().compare(o, value) >= 0);
|
||||
}
|
||||
|
||||
public Predicate<Object> matches(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> {
|
||||
if (o == null || value == null) {
|
||||
return ObjectUtils.nullSafeEquals(o, value);
|
||||
}
|
||||
|
||||
if (value instanceof Pattern) {
|
||||
var pattern = (Pattern)value;
|
||||
return pattern.matcher(o.toString()).find();
|
||||
}
|
||||
|
||||
return o.toString().matches(value.toString());
|
||||
});
|
||||
}
|
||||
|
||||
public Predicate<Object> in(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> {
|
||||
if (value instanceof Collection<?>) {
|
||||
var collection = (Collection<?>)value;
|
||||
if (o instanceof Collection<?>) {
|
||||
var subSet = (Collection<?>)o;
|
||||
return collection.containsAll(subSet);
|
||||
}
|
||||
|
||||
return collection.contains(o);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isArray(value)) {
|
||||
return ObjectUtils.containsElement(ObjectUtils.toObjectArray(value), value);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
public Predicate<Object> contains(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> {
|
||||
if (o == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (o instanceof Collection<?>) {
|
||||
var collection = (Collection<?>)o;
|
||||
return collection.contains(value);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isArray(o)) {
|
||||
return ObjectUtils.containsElement(ObjectUtils.toObjectArray(o), value);
|
||||
}
|
||||
|
||||
if (o instanceof Map<?, ?>) {
|
||||
var map = (Map<?, ?>)o;
|
||||
return map.containsValue(value);
|
||||
}
|
||||
|
||||
if (value == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String s = o.toString();
|
||||
|
||||
if (ObjectUtils.nullSafeEquals(Part.IgnoreCaseType.NEVER, part.shouldIgnoreCase())) {
|
||||
return s.contains(value.toString());
|
||||
}
|
||||
|
||||
return s.toLowerCase().contains(value.toString().toLowerCase());
|
||||
});
|
||||
}
|
||||
|
||||
public Predicate<Object> startsWith(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> {
|
||||
if (!(o instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
var s = (String)o;
|
||||
|
||||
if (ObjectUtils.nullSafeEquals(Part.IgnoreCaseType.NEVER, part.shouldIgnoreCase())) {
|
||||
return s.startsWith(value.toString());
|
||||
}
|
||||
|
||||
return s.toLowerCase().startsWith(value.toString().toLowerCase());
|
||||
});
|
||||
}
|
||||
|
||||
public Predicate<Object> endsWith(Object value) {
|
||||
return new DaprPredicate(part.getProperty(), value, o -> {
|
||||
if (!(o instanceof String)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var s = (String)o;
|
||||
if (ObjectUtils.nullSafeEquals(Part.IgnoreCaseType.NEVER, part.shouldIgnoreCase())) {
|
||||
return s.endsWith(value.toString());
|
||||
}
|
||||
|
||||
return s.toLowerCase().endsWith(value.toString().toLowerCase());
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.data.repository.query;
|
||||
|
||||
import org.springframework.dao.InvalidDataAccessApiUsageException;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.keyvalue.core.query.KeyValueQuery;
|
||||
import org.springframework.data.repository.query.ParameterAccessor;
|
||||
import org.springframework.data.repository.query.parser.AbstractQueryCreator;
|
||||
import org.springframework.data.repository.query.parser.Part;
|
||||
import org.springframework.data.repository.query.parser.PartTree;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* This class is copied from https://github.com/spring-projects/spring-data-keyvalue/blob/ff441439124585042dd0cbff952f977a343444d2/src/main/java/org/springframework/data/keyvalue/repository/query/PredicateQueryCreator.java#L46
|
||||
* because it has private accessors to internal classes, making it impossible to extend or use the original
|
||||
* This requires to be created from scratch to not use predicates, but this is only worth it if we can prove these
|
||||
* abstractions are worth the time.
|
||||
*/
|
||||
public class DaprPredicateQueryCreator extends AbstractQueryCreator<KeyValueQuery<Predicate<?>>, Predicate<?>> {
|
||||
|
||||
public DaprPredicateQueryCreator(PartTree tree, ParameterAccessor parameters) {
|
||||
super(tree, parameters);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Predicate<?> create(Part part, Iterator<Object> iterator) {
|
||||
DaprPredicateBuilder daprPredicateBuilder = DaprPredicateBuilder.propertyValueOf(part);
|
||||
|
||||
switch (part.getType()) {
|
||||
case TRUE:
|
||||
return daprPredicateBuilder.isTrue();
|
||||
case FALSE:
|
||||
return daprPredicateBuilder.isFalse();
|
||||
case SIMPLE_PROPERTY:
|
||||
return daprPredicateBuilder.isEqualTo(iterator.next());
|
||||
case IS_NULL:
|
||||
return daprPredicateBuilder.isNull();
|
||||
case IS_NOT_NULL:
|
||||
return daprPredicateBuilder.isNotNull();
|
||||
case LIKE:
|
||||
return daprPredicateBuilder.contains(iterator.next());
|
||||
case STARTING_WITH:
|
||||
return daprPredicateBuilder.startsWith(iterator.next());
|
||||
case AFTER:
|
||||
case GREATER_THAN:
|
||||
return daprPredicateBuilder.isGreaterThan(iterator.next());
|
||||
case GREATER_THAN_EQUAL:
|
||||
return daprPredicateBuilder.isGreaterThanEqual(iterator.next());
|
||||
case BEFORE:
|
||||
case LESS_THAN:
|
||||
return daprPredicateBuilder.isLessThan(iterator.next());
|
||||
case LESS_THAN_EQUAL:
|
||||
return daprPredicateBuilder.isLessThanEqual(iterator.next());
|
||||
case ENDING_WITH:
|
||||
return daprPredicateBuilder.endsWith(iterator.next());
|
||||
case BETWEEN:
|
||||
return daprPredicateBuilder.isGreaterThan(iterator.next())
|
||||
.and(daprPredicateBuilder.isLessThan(iterator.next()));
|
||||
case REGEX:
|
||||
return daprPredicateBuilder.matches(iterator.next());
|
||||
case IN:
|
||||
return daprPredicateBuilder.in(iterator.next());
|
||||
default:
|
||||
throw new InvalidDataAccessApiUsageException(String.format("Found invalid part '%s' in query", part.getType()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Predicate<?> and(Part part, Predicate<?> base, Iterator<Object> iterator) {
|
||||
return base.and((Predicate) create(part, iterator));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Predicate<?> or(Predicate<?> base, Predicate<?> criteria) {
|
||||
return base.or((Predicate) criteria);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected KeyValueQuery<Predicate<?>> complete(@Nullable Predicate<?> criteria, Sort sort) {
|
||||
if (criteria == null) {
|
||||
return new KeyValueQuery<>(it -> true, sort);
|
||||
}
|
||||
return new KeyValueQuery<>(criteria, sort);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-spring-messaging</artifactId>
|
||||
<name>dapr-spring-messaging</name>
|
||||
<description>Dapr Spring Messaging</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.messaging;
|
||||
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
public interface DaprMessagingOperations<T> {
|
||||
|
||||
/**
|
||||
* Sends a message to the specified topic in a blocking manner.
|
||||
*
|
||||
* @param topic the topic to send the message to or {@code null} to send to the
|
||||
* default topic
|
||||
* @param message the message to send
|
||||
*/
|
||||
void send(String topic, T message);
|
||||
|
||||
/**
|
||||
* Create a {@link SendMessageBuilder builder} for configuring and sending a message.
|
||||
*
|
||||
* @param message the payload of the message
|
||||
* @return the builder to configure and send the message
|
||||
*/
|
||||
SendMessageBuilder<T> newMessage(T message);
|
||||
|
||||
/**
|
||||
* Builder that can be used to configure and send a message. Provides more options
|
||||
* than the basic send/sendAsync methods provided by {@link DaprMessagingOperations}.
|
||||
*
|
||||
* @param <T> the message payload type
|
||||
*/
|
||||
interface SendMessageBuilder<T> {
|
||||
|
||||
/**
|
||||
* Specify the topic to send the message to.
|
||||
*
|
||||
* @param topic the destination topic
|
||||
* @return the current builder with the destination topic specified
|
||||
*/
|
||||
SendMessageBuilder<T> withTopic(String topic);
|
||||
|
||||
/**
|
||||
* Send the message in a blocking manner using the configured specification.
|
||||
*/
|
||||
void send();
|
||||
|
||||
/**
|
||||
* Uses the configured specification to send the message in a non-blocking manner.
|
||||
*
|
||||
* @return a Mono that completes when the message has been sent
|
||||
*/
|
||||
Mono<Void> sendAsync();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,205 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.messaging;
|
||||
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.client.domain.Metadata;
|
||||
import io.dapr.spring.messaging.observation.DaprMessagingObservationConvention;
|
||||
import io.dapr.spring.messaging.observation.DaprMessagingObservationDocumentation;
|
||||
import io.dapr.spring.messaging.observation.DaprMessagingSenderContext;
|
||||
import io.micrometer.observation.Observation;
|
||||
import io.micrometer.observation.ObservationRegistry;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
import org.springframework.beans.factory.SmartInitializingSingleton;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.util.context.Context;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Create a new DaprMessagingTemplate.
|
||||
* @param <T> templated message type
|
||||
*/
|
||||
public class DaprMessagingTemplate<T> implements DaprMessagingOperations<T>, ApplicationContextAware, BeanNameAware,
|
||||
SmartInitializingSingleton {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DaprMessagingTemplate.class);
|
||||
private static final String MESSAGE_TTL_IN_SECONDS = "10";
|
||||
private static final DaprMessagingObservationConvention DEFAULT_OBSERVATION_CONVENTION =
|
||||
DaprMessagingObservationConvention.getDefault();
|
||||
|
||||
private final DaprClient daprClient;
|
||||
private final String pubsubName;
|
||||
private final Map<String, String> metadata;
|
||||
private final boolean observationEnabled;
|
||||
|
||||
@Nullable
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@Nullable
|
||||
private String beanName;
|
||||
|
||||
@Nullable
|
||||
private ObservationRegistry observationRegistry;
|
||||
|
||||
@Nullable
|
||||
private DaprMessagingObservationConvention observationConvention;
|
||||
|
||||
/**
|
||||
* Constructs a new DaprMessagingTemplate.
|
||||
* @param daprClient Dapr client
|
||||
* @param pubsubName pubsub name
|
||||
* @param observationEnabled whether to enable observations
|
||||
*/
|
||||
public DaprMessagingTemplate(DaprClient daprClient, String pubsubName, boolean observationEnabled) {
|
||||
this.daprClient = daprClient;
|
||||
this.pubsubName = pubsubName;
|
||||
this.metadata = Map.of(Metadata.TTL_IN_SECONDS, MESSAGE_TTL_IN_SECONDS);
|
||||
this.observationEnabled = observationEnabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
/**
|
||||
* If observations are enabled, attempt to obtain the Observation registry and
|
||||
* convention.
|
||||
*/
|
||||
@Override
|
||||
public void afterSingletonsInstantiated() {
|
||||
if (!observationEnabled) {
|
||||
LOGGER.debug("Observations are not enabled - not recording");
|
||||
return;
|
||||
}
|
||||
|
||||
if (applicationContext == null) {
|
||||
LOGGER.warn("Observations enabled but application context null - not recording");
|
||||
return;
|
||||
}
|
||||
|
||||
observationRegistry = applicationContext.getBeanProvider(ObservationRegistry.class)
|
||||
.getIfUnique(() -> observationRegistry);
|
||||
observationConvention = applicationContext.getBeanProvider(DaprMessagingObservationConvention.class)
|
||||
.getIfUnique(() -> observationConvention);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send(String topic, T message) {
|
||||
doSend(topic, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SendMessageBuilder<T> newMessage(T message) {
|
||||
return new DefaultSendMessageBuilder<>(this, message);
|
||||
}
|
||||
|
||||
private void doSend(String topic, T message) {
|
||||
doSendAsync(topic, message).block();
|
||||
}
|
||||
|
||||
private Mono<Void> doSendAsync(String topic, T message) {
|
||||
LOGGER.trace("Sending message to '{}' topic", topic);
|
||||
|
||||
if (canUseObservation()) {
|
||||
return publishEventWithObservation(pubsubName, topic, message);
|
||||
}
|
||||
|
||||
return publishEvent(pubsubName, topic, message);
|
||||
}
|
||||
|
||||
private boolean canUseObservation() {
|
||||
return observationEnabled && observationRegistry != null && beanName != null;
|
||||
}
|
||||
|
||||
private Mono<Void> publishEvent(String pubsubName, String topic, T message) {
|
||||
return daprClient.publishEvent(pubsubName, topic, message, metadata);
|
||||
}
|
||||
|
||||
private Mono<Void> publishEventWithObservation(String pubsubName, String topic, T message) {
|
||||
DaprMessagingSenderContext senderContext = DaprMessagingSenderContext.newContext(topic, this.beanName);
|
||||
Observation observation = createObservation(senderContext);
|
||||
|
||||
observation.start();
|
||||
|
||||
return publishEvent(pubsubName, topic, message)
|
||||
.contextWrite(getReactorContext(senderContext))
|
||||
.doOnError(err -> {
|
||||
LOGGER.error("Failed to send msg to '{}' topic", topic, err);
|
||||
|
||||
observation.error(err);
|
||||
observation.stop();
|
||||
})
|
||||
.doOnSuccess(ignore -> {
|
||||
LOGGER.trace("Sent msg to '{}' topic", topic);
|
||||
|
||||
observation.stop();
|
||||
});
|
||||
}
|
||||
|
||||
private Context getReactorContext(DaprMessagingSenderContext senderContext) {
|
||||
return Context.of(senderContext.properties());
|
||||
}
|
||||
|
||||
private Observation createObservation(DaprMessagingSenderContext senderContext) {
|
||||
return DaprMessagingObservationDocumentation.TEMPLATE_OBSERVATION.observation(
|
||||
observationConvention,
|
||||
DEFAULT_OBSERVATION_CONVENTION,
|
||||
() -> senderContext,
|
||||
observationRegistry
|
||||
);
|
||||
}
|
||||
|
||||
private static class DefaultSendMessageBuilder<T> implements SendMessageBuilder<T> {
|
||||
|
||||
private final DaprMessagingTemplate<T> template;
|
||||
|
||||
private final T message;
|
||||
|
||||
private String topic;
|
||||
|
||||
DefaultSendMessageBuilder(DaprMessagingTemplate<T> template, T message) {
|
||||
this.template = template;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SendMessageBuilder<T> withTopic(String topic) {
|
||||
this.topic = topic;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void send() {
|
||||
template.doSend(topic, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> sendAsync() {
|
||||
return template.doSendAsync(topic, message);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.messaging.observation;
|
||||
|
||||
import io.micrometer.observation.Observation.Context;
|
||||
import io.micrometer.observation.ObservationConvention;
|
||||
|
||||
/**
|
||||
* {@link ObservationConvention} for Dapr Messaging.
|
||||
*
|
||||
*/
|
||||
public interface DaprMessagingObservationConvention extends ObservationConvention<DaprMessagingSenderContext> {
|
||||
|
||||
@Override
|
||||
default boolean supportsContext(Context context) {
|
||||
return context instanceof DaprMessagingSenderContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
default String getName() {
|
||||
return "spring.dapr.messaging.template";
|
||||
}
|
||||
|
||||
static DaprMessagingObservationConvention getDefault() {
|
||||
return DefaultDaprMessagingObservationConvention.INSTANCE;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.messaging.observation;
|
||||
|
||||
import io.micrometer.common.docs.KeyName;
|
||||
import io.micrometer.observation.Observation;
|
||||
import io.micrometer.observation.Observation.Context;
|
||||
import io.micrometer.observation.ObservationConvention;
|
||||
import io.micrometer.observation.docs.ObservationDocumentation;
|
||||
|
||||
/**
|
||||
* An {@link Observation} for {@link io.dapr.spring.messaging.DaprMessagingTemplate}.
|
||||
*
|
||||
*/
|
||||
public enum DaprMessagingObservationDocumentation implements ObservationDocumentation {
|
||||
|
||||
/**
|
||||
* Observation created when a Dapr template sends a message.
|
||||
*/
|
||||
TEMPLATE_OBSERVATION {
|
||||
|
||||
@Override
|
||||
public Class<? extends ObservationConvention<? extends Context>> getDefaultConvention() {
|
||||
return DefaultDaprMessagingObservationConvention.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefix() {
|
||||
return "spring.dapr.messaging.template";
|
||||
}
|
||||
|
||||
@Override
|
||||
public KeyName[] getLowCardinalityKeyNames() {
|
||||
return TemplateLowCardinalityTags.values();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Low cardinality tags.
|
||||
*/
|
||||
public enum TemplateLowCardinalityTags implements KeyName {
|
||||
/**
|
||||
* Bean name of the template that sent the message.
|
||||
*/
|
||||
BEAN_NAME {
|
||||
|
||||
@Override
|
||||
public String asString() {
|
||||
return "spring.dapr.messaging.template.name";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.messaging.observation;
|
||||
|
||||
import io.micrometer.observation.transport.SenderContext;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* {@link SenderContext} for Dapr Messaging.
|
||||
*
|
||||
*/
|
||||
public final class DaprMessagingSenderContext extends SenderContext<DaprMessagingSenderContext.Carrier> {
|
||||
private final String beanName;
|
||||
|
||||
private final String destination;
|
||||
|
||||
private DaprMessagingSenderContext(Carrier dataHolder, String topic, String beanName) {
|
||||
super((carrier, key, value) -> dataHolder.property(key, value));
|
||||
setCarrier(dataHolder);
|
||||
this.beanName = beanName;
|
||||
this.destination = topic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new context.
|
||||
* @param topic topic to be used
|
||||
* @param beanName name of the bean used usually (typically a {@code DaprMessagingTemplate})
|
||||
* @return DaprMessageSenderContext
|
||||
*/
|
||||
public static DaprMessagingSenderContext newContext(String topic, String beanName) {
|
||||
Carrier carrier = new Carrier();
|
||||
return new DaprMessagingSenderContext(carrier, topic, beanName);
|
||||
}
|
||||
|
||||
/**
|
||||
* The properties of the message.
|
||||
* @return the properties of the message
|
||||
*/
|
||||
public Map<String, String> properties() {
|
||||
Carrier carrier = getCarrier();
|
||||
|
||||
if (carrier == null) {
|
||||
return Map.of();
|
||||
}
|
||||
|
||||
return carrier.properties();
|
||||
}
|
||||
|
||||
/**
|
||||
* The name of the bean sending the message (typically a {@code DaprMessagingTemplate}).
|
||||
* @return the name of the bean sending the message
|
||||
*/
|
||||
public String getBeanName() {
|
||||
return this.beanName;
|
||||
}
|
||||
|
||||
/**
|
||||
* The destination topic for the message.
|
||||
* @return the topic the message is being sent to
|
||||
*/
|
||||
public String getDestination() {
|
||||
return this.destination;
|
||||
}
|
||||
|
||||
/**
|
||||
* Acts as a carrier for a Dapr message and records the propagated properties for
|
||||
* later access by the Dapr.
|
||||
*/
|
||||
public static final class Carrier {
|
||||
|
||||
private final Map<String, String> properties = new HashMap<>();
|
||||
|
||||
private Carrier() {
|
||||
}
|
||||
|
||||
public void property(String key, String value) {
|
||||
this.properties.put(key, value);
|
||||
}
|
||||
|
||||
public Map<String, String> properties() {
|
||||
return Map.copyOf(this.properties);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright 2024 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.messaging.observation;
|
||||
|
||||
import io.micrometer.common.KeyValues;
|
||||
|
||||
/**
|
||||
* Default {@link DefaultDaprMessagingObservationConvention} for Dapr template key values.
|
||||
*
|
||||
*/
|
||||
class DefaultDaprMessagingObservationConvention implements DaprMessagingObservationConvention {
|
||||
/**
|
||||
* A singleton instance of the convention.
|
||||
*/
|
||||
public static final DefaultDaprMessagingObservationConvention INSTANCE =
|
||||
new DefaultDaprMessagingObservationConvention();
|
||||
|
||||
@Override
|
||||
public KeyValues getLowCardinalityKeyValues(DaprMessagingSenderContext context) {
|
||||
return KeyValues.of(DaprMessagingObservationDocumentation.TemplateLowCardinalityTags.BEAN_NAME.asString(),
|
||||
context.getBeanName());
|
||||
}
|
||||
|
||||
// Remove once addressed:
|
||||
// https://github.com/micrometer-metrics/micrometer-docs-generator/issues/30
|
||||
@Override
|
||||
public String getName() {
|
||||
return "spring.dapr.messaging.template";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContextualName(DaprMessagingSenderContext context) {
|
||||
return context.getDestination() + " send";
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dapr-spring-workflows</artifactId>
|
||||
<name>dapr-spring-workflows</name>
|
||||
<description>Dapr Spring Workflows</description>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-workflows</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright 2021 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.workflows.config;
|
||||
|
||||
import io.dapr.workflows.Workflow;
|
||||
import io.dapr.workflows.WorkflowActivity;
|
||||
import io.dapr.workflows.runtime.WorkflowRuntime;
|
||||
import io.dapr.workflows.runtime.WorkflowRuntimeBuilder;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Configuration
|
||||
public class DaprWorkflowsConfiguration implements ApplicationContextAware {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(DaprWorkflowsConfiguration.class);
|
||||
|
||||
private final WorkflowRuntimeBuilder workflowRuntimeBuilder;
|
||||
|
||||
public DaprWorkflowsConfiguration(WorkflowRuntimeBuilder workflowRuntimeBuilder) {
|
||||
this.workflowRuntimeBuilder = workflowRuntimeBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register workflows and activities to the workflowRuntimeBuilder.
|
||||
* @param applicationContext Spring Application Context
|
||||
*/
|
||||
private void registerWorkflowsAndActivities(ApplicationContext applicationContext) {
|
||||
LOGGER.info("Registering Dapr Workflows and Activities");
|
||||
|
||||
Map<String, Workflow> workflowBeans = applicationContext.getBeansOfType(Workflow.class);
|
||||
|
||||
for (Workflow workflow : workflowBeans.values()) {
|
||||
LOGGER.info("Dapr Workflow: '{}' registered", workflow.getClass().getName());
|
||||
|
||||
workflowRuntimeBuilder.registerWorkflow(workflow);
|
||||
}
|
||||
|
||||
Map<String, WorkflowActivity> workflowActivitiesBeans = applicationContext.getBeansOfType(WorkflowActivity.class);
|
||||
|
||||
for (WorkflowActivity activity : workflowActivitiesBeans.values()) {
|
||||
LOGGER.info("Dapr Workflow Activity: '{}' registered", activity.getClass().getName());
|
||||
|
||||
workflowRuntimeBuilder.registerActivity(activity);
|
||||
}
|
||||
|
||||
WorkflowRuntime runtime = workflowRuntimeBuilder.build();
|
||||
LOGGER.info("Starting workflow runtime ... ");
|
||||
runtime.start(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
registerWorkflowsAndActivities(applicationContext);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright 2021 The Dapr Authors
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package io.dapr.spring.workflows.config;
|
||||
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.TYPE;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
@Retention(RUNTIME)
|
||||
@Target(TYPE)
|
||||
@Import(DaprWorkflowsConfiguration.class)
|
||||
public @interface EnableDaprWorkflows {
|
||||
}
|
|
@ -0,0 +1,255 @@
|
|||
<project
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-parent</artifactId>
|
||||
<version>1.16.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>0.16.0-SNAPSHOT</version>
|
||||
<name>dapr-spring-parent</name>
|
||||
<description>SDK extension for Spring and Spring Boot</description>
|
||||
|
||||
<modules>
|
||||
<module>dapr-spring-data</module>
|
||||
<module>dapr-spring-messaging</module>
|
||||
<module>dapr-spring-workflows</module>
|
||||
<module>dapr-spring-boot-autoconfigure</module>
|
||||
<module>dapr-spring-boot-tests</module>
|
||||
<module>dapr-spring-boot-starters/dapr-spring-boot-starter</module>
|
||||
<module>dapr-spring-boot-starters/dapr-spring-boot-starter-test</module>
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<maven.compiler.release>11</maven.compiler.release>
|
||||
<testcontainers.version>1.19.8</testcontainers.version>
|
||||
<junit.version>5.11.2</junit.version>
|
||||
<dapr.spring.version>0.16.0-SNAPSHOT</dapr.spring.version>
|
||||
<springboot.version>3.2.6</springboot.version>
|
||||
<springframework.version>6.1.20</springframework.version>
|
||||
<logback-core.version>1.4.14</logback-core.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<type>pom</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk</artifactId>
|
||||
<version>${dapr.sdk.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-actors</artifactId>
|
||||
<version>${dapr.sdk.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-workflows</artifactId>
|
||||
<version>${dapr.sdk.alpha.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-data</artifactId>
|
||||
<version>${dapr.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-messaging</artifactId>
|
||||
<version>${dapr.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-workflows</artifactId>
|
||||
<version>${dapr.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-autoconfigure</artifactId>
|
||||
<version>${dapr.spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-springboot</artifactId>
|
||||
<version>${dapr.sdk.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context</artifactId>
|
||||
<version>${springframework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-beans</artifactId>
|
||||
<version>${springframework.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<version>${springframework.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure-processor</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-tests</artifactId>
|
||||
<version>${dapr.spring.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Test dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-api</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<version>${springboot.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-params</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter-engine</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.testcontainers</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<version>${testcontainers.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
<version>${logback-core.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.plugins</groupId>
|
||||
<artifactId>nexus-staging-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.2.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
<version>0.8.12</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default-prepare-agent</id>
|
||||
<goals>
|
||||
<goal>prepare-agent</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>report</id>
|
||||
<phase>test</phase>
|
||||
<goals>
|
||||
<goal>report</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>target/jacoco-report/</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>check</id>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<rule>
|
||||
<element>BUNDLE</element>
|
||||
<includes>
|
||||
<include>io.dapr.springboot.DaprBeanPostProcessor</include>
|
||||
</includes>
|
||||
<limits>
|
||||
<limit>
|
||||
<counter>LINE</counter>
|
||||
<value>COVEREDRATIO</value>
|
||||
<minimum>80%</minimum>
|
||||
</limit>
|
||||
</limits>
|
||||
</rule>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,11 @@
|
|||
<FindBugsFilter>
|
||||
<Match>
|
||||
<Package name="~io\.dapr\.spring.*"/>
|
||||
<Bug pattern="EI_EXPOSE_REP"/>
|
||||
</Match>
|
||||
|
||||
<Match>
|
||||
<Package name="~io\.dapr\.spring.*"/>
|
||||
<Bug pattern="EI_EXPOSE_REP2"/>
|
||||
</Match>
|
||||
</FindBugsFilter>
|
|
@ -21,3 +21,7 @@ The `daprdocs` directory contains the markdown files that are rendered into the
|
|||
|
||||
- All rules in the [docs guide]({{< ref contributing-docs.md >}}) should be followed in addition to these.
|
||||
- All files and directories should be prefixed with `java-` to ensure all file/directory names are globally unique across all Dapr documentation.
|
||||
|
||||
## Github Dapr Bot Commands
|
||||
|
||||
Checkout the [daprbot documentation](https://docs.dapr.io/contributing/daprbot/) for Github commands you can run in this repo for common tasks. For example, you can run the `/assign` (as a comment on an issue) to assign the issue to yourself.
|
||||
|
|
|
@ -11,6 +11,8 @@ cascade:
|
|||
github_branch: master
|
||||
---
|
||||
|
||||
Dapr offers a variety of packages to help with the development of Java applications. Using them you can create Java clients, servers, and virtual actors with Dapr.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Dapr CLI]({{< ref install-dapr-cli.md >}}) installed
|
||||
|
@ -44,19 +46,19 @@ For a Maven project, add the following to your `pom.xml` file:
|
|||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.14.1</version>
|
||||
</dependency>
|
||||
<!-- Dapr's SDK for Actors (optional). -->
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-actors</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.14.1</version>
|
||||
</dependency>
|
||||
<!-- Dapr's SDK integration with SpringBoot (optional). -->
|
||||
<dependency>
|
||||
<groupId>io.dapr</groupId>
|
||||
<artifactId>dapr-sdk-springboot</artifactId>
|
||||
<version>1.9.0</version>
|
||||
<version>1.14.1</version>
|
||||
</dependency>
|
||||
...
|
||||
</dependencies>
|
||||
|
@ -74,11 +76,11 @@ For a Gradle project, add the following to your `build.gradle` file:
|
|||
dependencies {
|
||||
...
|
||||
// Dapr's core SDK with all features, except Actors.
|
||||
compile('io.dapr:dapr-sdk:1.9.0')
|
||||
compile('io.dapr:dapr-sdk:1.14.1')
|
||||
// Dapr's SDK for Actors (optional).
|
||||
compile('io.dapr:dapr-sdk-actors:1.9.0')
|
||||
compile('io.dapr:dapr-sdk-actors:1.14.1')
|
||||
// Dapr's SDK integration with SpringBoot (optional).
|
||||
compile('io.dapr:dapr-sdk-springboot:1.9.0')
|
||||
compile('io.dapr:dapr-sdk-springboot:1.14.1')
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -94,7 +96,7 @@ You can fix this by specifying a compatible `OkHttp` version in your project to
|
|||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.9.0</version>
|
||||
<version>1.14.1</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
@ -107,6 +109,37 @@ Put the Dapr Java SDK to the test. Walk through the Java quickstarts and tutoria
|
|||
| [Quickstarts]({{< ref quickstarts >}}) | Experience Dapr's API building blocks in just a few minutes using the Java SDK. |
|
||||
| [SDK samples](https://github.com/dapr/java-sdk/tree/master/examples) | Clone the SDK repo to try out some examples and get started. |
|
||||
|
||||
## More information
|
||||
```java
|
||||
import io.dapr.client.DaprClient;
|
||||
import io.dapr.client.DaprClientBuilder;
|
||||
|
||||
Learn more about the [Dapr Java SDK packages available to add to your Java applications](https://dapr.github.io/java-sdk/).
|
||||
try (DaprClient client = (new DaprClientBuilder()).build()) {
|
||||
// sending a class with message; BINDING_OPERATION="create"
|
||||
client.invokeBinding(BINDING_NAME, BINDING_OPERATION, myClass).block();
|
||||
|
||||
// sending a plain string
|
||||
client.invokeBinding(BINDING_NAME, BINDING_OPERATION, message).block();
|
||||
}
|
||||
```
|
||||
|
||||
- For a full guide on output bindings visit [How-To: Output bindings]({{< ref howto-bindings.md >}}).
|
||||
- Visit [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/bindings/http) for code samples and instructions to try out output bindings.
|
||||
|
||||
## Available packages
|
||||
|
||||
<div class="card-deck">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><b>Client</b></h5>
|
||||
<p class="card-text">Create Java clients that interact with a Dapr sidecar and other Dapr applications.</p>
|
||||
<a href="{{< ref java-client >}}" class="stretched-link"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><b>Workflow</b></h5>
|
||||
<p class="card-text">Create and manage workflows that work with other Dapr APIs in Java.</p>
|
||||
<a href="{{< ref workflow >}}" class="stretched-link"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
type: docs
|
||||
title: "AI"
|
||||
linkTitle: "AI"
|
||||
weight: 3000
|
||||
description: With the Dapr Conversation AI package, you can interact with the Dapr AI workloads from a Java application. To get started, walk through the [Dapr AI]({{< ref java-ai-howto.md >}}) how-to guide.
|
||||
---
|
|
@ -0,0 +1,105 @@
|
|||
---
|
||||
type: docs
|
||||
title: "How to: Author and manage Dapr Conversation AI in the Java SDK"
|
||||
linkTitle: "How to: Author and manage Conversation AI"
|
||||
weight: 20000
|
||||
description: How to get up and running with Conversation AI using the Dapr Java SDK
|
||||
---
|
||||
|
||||
As part of this demonstration, we will look at how to use the Conversation API to converse with a Large Language Model (LLM). The API
|
||||
will return the response from the LLM for the given prompt. With the [provided conversation ai example](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/conversation), you will:
|
||||
|
||||
- You will provide a prompt using the [Conversation AI example](https://github.com/dapr/java-sdk/blob/master/examples/src/main/java/io/dapr/examples/conversation/DemoConversationAI.java)
|
||||
- Filter out Personally identifiable information (PII).
|
||||
|
||||
This example uses the default configuration from `dapr init` in [self-hosted mode](https://github.com/dapr/cli#install-dapr-on-your-local-machine-self-hosted).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
|
||||
- Java JDK 11 (or greater):
|
||||
- [Oracle JDK](https://www.oracle.com/java/technologies/downloads), or
|
||||
- OpenJDK
|
||||
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
|
||||
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
||||
## Set up the environment
|
||||
|
||||
Clone the [Java SDK repo](https://github.com/dapr/java-sdk) and navigate into it.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/java-sdk.git
|
||||
cd java-sdk
|
||||
```
|
||||
|
||||
Run the following command to install the requirements for running the Conversation AI example with the Dapr Java SDK.
|
||||
|
||||
```bash
|
||||
mvn clean install -DskipTests
|
||||
```
|
||||
|
||||
From the Java SDK root directory, navigate to the examples' directory.
|
||||
|
||||
```bash
|
||||
cd examples
|
||||
```
|
||||
|
||||
Run the Dapr sidecar.
|
||||
|
||||
```sh
|
||||
dapr run --app-id conversationapp --dapr-grpc-port 51439 --dapr-http-port 3500 --app-port 8080
|
||||
```
|
||||
|
||||
> Now, Dapr is listening for HTTP requests at `http://localhost:3500` and gRPC requests at `http://localhost:51439`.
|
||||
|
||||
## Send a prompt with Personally identifiable information (PII) to the Conversation AI API
|
||||
|
||||
In the `DemoConversationAI` there are steps to send a prompt using the `converse` method under the `DaprPreviewClient`.
|
||||
|
||||
```java
|
||||
public class DemoConversationAI {
|
||||
/**
|
||||
* The main method to start the client.
|
||||
*
|
||||
* @param args Input arguments (unused).
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
try (DaprPreviewClient client = new DaprClientBuilder().buildPreviewClient()) {
|
||||
System.out.println("Sending the following input to LLM: Hello How are you? This is the my number 672-123-4567");
|
||||
|
||||
ConversationInput daprConversationInput = new ConversationInput("Hello How are you? "
|
||||
+ "This is the my number 672-123-4567");
|
||||
|
||||
// Component name is the name provided in the metadata block of the conversation.yaml file.
|
||||
Mono<ConversationResponse> responseMono = client.converse(new ConversationRequest("echo",
|
||||
List.of(daprConversationInput))
|
||||
.setContextId("contextId")
|
||||
.setScrubPii(true).setTemperature(1.1d));
|
||||
ConversationResponse response = responseMono.block();
|
||||
System.out.printf("Conversation output: %s", response.getConversationOutputs().get(0).getResult());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Run the `DemoConversationAI` with the following command.
|
||||
|
||||
```sh
|
||||
java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.conversation.DemoConversationAI
|
||||
```
|
||||
|
||||
### Sample output
|
||||
```
|
||||
== APP == Conversation output: Hello How are you? This is the my number <ISBN>
|
||||
```
|
||||
|
||||
As shown in the output, the number sent to the API is obfuscated and returned in the form of <ISBN>.
|
||||
The example above uses an ["echo"](https://docs.dapr.io/developing-applications/building-blocks/conversation/howto-conversation-layer/#set-up-the-conversation-component)
|
||||
component for testing, which simply returns the input message.
|
||||
When integrated with LLMs like OpenAI or Claude, you’ll receive meaningful responses instead of echoed input.
|
||||
|
||||
## Next steps
|
||||
- [Learn more about Conversation AI]({{< ref conversation-overview.md >}})
|
||||
- [Conversation AI API reference]({{< ref conversation_api.md >}})
|
|
@ -1,14 +1,54 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Dapr Java SDK"
|
||||
linkTitle: "Java"
|
||||
weight: 2000
|
||||
description: Java SDK packages for developing Dapr applications
|
||||
title: "Getting started with the Dapr client Java SDK"
|
||||
linkTitle: "Client"
|
||||
weight: 3000
|
||||
description: How to get up and running with the Dapr Java SDK
|
||||
---
|
||||
|
||||
The Dapr client package allows you to interact with other Dapr applications from a Java application.
|
||||
|
||||
{{% alert title="Note" color="primary" %}}
|
||||
If you haven't already, [try out one of the quickstarts]({{< ref quickstarts >}}) for a quick walk-through on how to use the Dapr Java SDK with an API building block.
|
||||
|
||||
{{% /alert %}}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
[Complete initial setup and import the Java SDK into your project]({{< ref java-sdk-docs >}})
|
||||
[Complete initial setup and import the Java SDK into your project]({{< ref java >}})
|
||||
|
||||
## Initializing the client
|
||||
You can initialize a Dapr client as so:
|
||||
|
||||
```java
|
||||
DaprClient client = new DaprClientBuilder().build()
|
||||
```
|
||||
|
||||
This will connect to the default Dapr gRPC endpoint `localhost:50001`. For information about configuring the client using environment variables and system properties, see [Properties]({{< ref properties.md >}}).
|
||||
|
||||
#### Error Handling
|
||||
|
||||
Initially, errors in Dapr followed the Standard gRPC error model. However, to provide more detailed and informative error
|
||||
messages, in version 1.13 an enhanced error model has been introduced which aligns with the gRPC Richer error model. In
|
||||
response, the Java SDK extended the DaprException to include the error details that were added in Dapr.
|
||||
|
||||
Example of handling the DaprException and consuming the error details when using the Dapr Java SDK:
|
||||
|
||||
```java
|
||||
...
|
||||
try {
|
||||
client.publishEvent("unknown_pubsub", "mytopic", "mydata").block();
|
||||
} catch (DaprException exception) {
|
||||
System.out.println("Dapr exception's error code: " + exception.getErrorCode());
|
||||
System.out.println("Dapr exception's message: " + exception.getMessage());
|
||||
// DaprException now contains `getStatusDetails()` to include more details about the error from Dapr runtime.
|
||||
System.out.println("Dapr exception's reason: " + exception.getStatusDetails().get(
|
||||
DaprErrorDetails.ErrorDetailType.ERROR_INFO,
|
||||
"reason",
|
||||
TypeRef.STRING));
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
## Building blocks
|
||||
|
||||
|
@ -442,8 +482,6 @@ public class DistributedLockGrpcClient {
|
|||
|
||||
### Workflow
|
||||
|
||||
> Dapr Workflow is currently in beta state.
|
||||
|
||||
```java
|
||||
package io.dapr.examples.workflows;
|
||||
|
||||
|
@ -564,5 +602,37 @@ public class DemoWorkflowClient {
|
|||
- [How-To: Manage workflows]({{< ref howto-manage-workflow.md >}}).
|
||||
- [Learn more about how to use workflows with the Java SDK]({{< ref java-workflow.md >}}).
|
||||
|
||||
## Sidecar APIs
|
||||
|
||||
#### Wait for sidecar
|
||||
The `DaprClient` also provides a helper method to wait for the sidecar to become healthy (components only). When using
|
||||
this method, be sure to specify a timeout in milliseconds and block() to wait for the result of a reactive operation.
|
||||
|
||||
```java
|
||||
// Wait for the Dapr sidecar to report healthy before attempting to use Dapr components.
|
||||
try (DaprClient client = new DaprClientBuilder().build()) {
|
||||
System.out.println("Waiting for Dapr sidecar ...");
|
||||
client.waitForSidecar(10000).block(); // Specify the timeout in milliseconds
|
||||
System.out.println("Dapr sidecar is ready.");
|
||||
...
|
||||
}
|
||||
|
||||
// Perform Dapr component operations here i.e. fetching secrets or saving state.
|
||||
```
|
||||
|
||||
### Shutdown the sidecar
|
||||
```java
|
||||
try (DaprClient client = new DaprClientBuilder().build()) {
|
||||
logger.info("Sending shutdown request.");
|
||||
client.shutdown().block();
|
||||
logger.info("Ensuring dapr has stopped.");
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Learn more about the [Dapr Java SDK packages available to add to your Java applications](https://dapr.github.io/java-sdk/).
|
||||
|
||||
## Related links
|
||||
- [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples)
|
||||
|
||||
For a full list of SDK properties and how to configure them, visit [Properties]({{< ref properties.md >}}).
|
|
@ -0,0 +1,198 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Properties"
|
||||
linkTitle: "Properties"
|
||||
weight: 3001
|
||||
description: SDK-wide properties for configuring the Dapr Java SDK using environment variables and system properties
|
||||
---
|
||||
|
||||
# Properties
|
||||
|
||||
The Dapr Java SDK provides a set of global properties that control the behavior of the SDK. These properties can be configured using environment variables or system properties. System properties can be set using the `-D` flag when running your Java application.
|
||||
|
||||
These properties affect the entire SDK, including clients and runtime. They control aspects such as:
|
||||
- Sidecar connectivity (endpoints, ports)
|
||||
- Security settings (TLS, API tokens)
|
||||
- Performance tuning (timeouts, connection pools)
|
||||
- Protocol settings (gRPC, HTTP)
|
||||
- String encoding
|
||||
|
||||
## Environment Variables
|
||||
|
||||
The following environment variables are available for configuring the Dapr Java SDK:
|
||||
|
||||
### Sidecar Endpoints
|
||||
|
||||
When these variables are set, the client will automatically use them to connect to the Dapr sidecar.
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
|---------------------|-------------|---------|
|
||||
| `DAPR_GRPC_ENDPOINT` | The gRPC endpoint for the Dapr sidecar | `localhost:50001` |
|
||||
| `DAPR_HTTP_ENDPOINT` | The HTTP endpoint for the Dapr sidecar | `localhost:3500` |
|
||||
| `DAPR_GRPC_PORT` | The gRPC port for the Dapr sidecar (legacy, `DAPR_GRPC_ENDPOINT` takes precedence) | `50001` |
|
||||
| `DAPR_HTTP_PORT` | The HTTP port for the Dapr sidecar (legacy, `DAPR_HTTP_ENDPOINT` takes precedence) | `3500` |
|
||||
|
||||
### API Token
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
|---------------------|-------------|---------|
|
||||
| `DAPR_API_TOKEN` | API token for authentication between app and Dapr sidecar. This is the same token used by the Dapr runtime for API authentication. For more details, see [Dapr API token authentication](https://docs.dapr.io/operations/security/api-token/) and [Environment variables reference](https://docs.dapr.io/reference/environment/#dapr_api_token). | `null` |
|
||||
|
||||
### gRPC Configuration
|
||||
|
||||
#### TLS Settings
|
||||
For secure gRPC communication, you can configure TLS settings using the following environment variables:
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
|---------------------|-------------|---------|
|
||||
| `DAPR_GRPC_TLS_INSECURE` | When set to "true", enables insecure TLS mode which still uses TLS but doesn't verify certificates. This uses InsecureTrustManagerFactory to trust all certificates. This should only be used for testing or in secure environments. | `false` |
|
||||
| `DAPR_GRPC_TLS_CA_PATH` | Path to the CA certificate file. This is used for TLS connections to servers with self-signed certificates. | `null` |
|
||||
| `DAPR_GRPC_TLS_CERT_PATH` | Path to the TLS certificate file for client authentication. | `null` |
|
||||
| `DAPR_GRPC_TLS_KEY_PATH` | Path to the TLS private key file for client authentication. | `null` |
|
||||
|
||||
#### Keepalive Settings
|
||||
Configure gRPC keepalive behavior using these environment variables:
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
|---------------------|-------------|---------|
|
||||
| `DAPR_GRPC_ENABLE_KEEP_ALIVE` | Whether to enable gRPC keepalive | `false` |
|
||||
| `DAPR_GRPC_KEEP_ALIVE_TIME_SECONDS` | gRPC keepalive time in seconds | `10` |
|
||||
| `DAPR_GRPC_KEEP_ALIVE_TIMEOUT_SECONDS` | gRPC keepalive timeout in seconds | `5` |
|
||||
| `DAPR_GRPC_KEEP_ALIVE_WITHOUT_CALLS` | Whether to keep gRPC connection alive without calls | `true` |
|
||||
|
||||
### HTTP Client Configuration
|
||||
|
||||
These properties control the behavior of the HTTP client used for communication with the Dapr sidecar:
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
|---------------------|-------------|---------|
|
||||
| `DAPR_HTTP_CLIENT_READ_TIMEOUT_SECONDS` | Timeout in seconds for HTTP client read operations. This is the maximum time to wait for a response from the Dapr sidecar. | `60` |
|
||||
| `DAPR_HTTP_CLIENT_MAX_REQUESTS` | Maximum number of concurrent HTTP requests that can be executed. Above this limit, requests will queue in memory waiting for running calls to complete. | `1024` |
|
||||
| `DAPR_HTTP_CLIENT_MAX_IDLE_CONNECTIONS` | Maximum number of idle connections in the HTTP connection pool. This is the maximum number of connections that can remain idle in the pool. | `128` |
|
||||
|
||||
### API Configuration
|
||||
|
||||
These properties control the behavior of API calls made through the SDK:
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
|---------------------|-------------|---------|
|
||||
| `DAPR_API_MAX_RETRIES` | Maximum number of retries for retriable exceptions when making API calls to the Dapr sidecar | `0` |
|
||||
| `DAPR_API_TIMEOUT_MILLISECONDS` | Timeout in milliseconds for API calls to the Dapr sidecar. A value of 0 means no timeout. | `0` |
|
||||
|
||||
### String Encoding
|
||||
|
||||
| Environment Variable | Description | Default |
|
||||
|---------------------|-------------|---------|
|
||||
| `DAPR_STRING_CHARSET` | Character set used for string encoding/decoding in the SDK. Must be a valid Java charset name. | `UTF-8` |
|
||||
|
||||
### System Properties
|
||||
|
||||
All environment variables can be set as system properties using the `-D` flag. Here is the complete list of available system properties:
|
||||
|
||||
| System Property | Description | Default |
|
||||
|----------------|-------------|---------|
|
||||
| `dapr.sidecar.ip` | IP address for the Dapr sidecar | `localhost` |
|
||||
| `dapr.http.port` | HTTP port for the Dapr sidecar | `3500` |
|
||||
| `dapr.grpc.port` | gRPC port for the Dapr sidecar | `50001` |
|
||||
| `dapr.grpc.tls.cert.path` | Path to the gRPC TLS certificate | `null` |
|
||||
| `dapr.grpc.tls.key.path` | Path to the gRPC TLS key | `null` |
|
||||
| `dapr.grpc.tls.ca.path` | Path to the gRPC TLS CA certificate | `null` |
|
||||
| `dapr.grpc.tls.insecure` | Whether to use insecure TLS mode | `false` |
|
||||
| `dapr.grpc.endpoint` | gRPC endpoint for remote sidecar | `null` |
|
||||
| `dapr.grpc.enable.keep.alive` | Whether to enable gRPC keepalive | `false` |
|
||||
| `dapr.grpc.keep.alive.time.seconds` | gRPC keepalive time in seconds | `10` |
|
||||
| `dapr.grpc.keep.alive.timeout.seconds` | gRPC keepalive timeout in seconds | `5` |
|
||||
| `dapr.grpc.keep.alive.without.calls` | Whether to keep gRPC connection alive without calls | `true` |
|
||||
| `dapr.http.endpoint` | HTTP endpoint for remote sidecar | `null` |
|
||||
| `dapr.api.maxRetries` | Maximum number of retries for API calls | `0` |
|
||||
| `dapr.api.timeoutMilliseconds` | Timeout for API calls in milliseconds | `0` |
|
||||
| `dapr.api.token` | API token for authentication | `null` |
|
||||
| `dapr.string.charset` | String encoding used in the SDK | `UTF-8` |
|
||||
| `dapr.http.client.readTimeoutSeconds` | Timeout in seconds for HTTP client reads | `60` |
|
||||
| `dapr.http.client.maxRequests` | Maximum number of concurrent HTTP requests | `1024` |
|
||||
| `dapr.http.client.maxIdleConnections` | Maximum number of idle HTTP connections | `128` |
|
||||
|
||||
## Property Resolution Order
|
||||
|
||||
Properties are resolved in the following order:
|
||||
1. Override values (if provided when creating a Properties instance)
|
||||
2. System properties (set via `-D`)
|
||||
3. Environment variables
|
||||
4. Default values
|
||||
|
||||
The SDK checks each source in order. If a value is invalid for the property type (e.g., non-numeric for a numeric property), the SDK will log a warning and try the next source. For example:
|
||||
|
||||
```bash
|
||||
# Invalid boolean value - will be ignored
|
||||
java -Ddapr.grpc.enable.keep.alive=not-a-boolean -jar myapp.jar
|
||||
|
||||
# Valid boolean value - will be used
|
||||
export DAPR_GRPC_ENABLE_KEEP_ALIVE=false
|
||||
```
|
||||
|
||||
In this case, the environment variable is used because the system property value is invalid. However, if both values are valid, the system property takes precedence:
|
||||
|
||||
```bash
|
||||
# Valid boolean value - will be used
|
||||
java -Ddapr.grpc.enable.keep.alive=true -jar myapp.jar
|
||||
|
||||
# Valid boolean value - will be ignored
|
||||
export DAPR_GRPC_ENABLE_KEEP_ALIVE=false
|
||||
```
|
||||
|
||||
Override values can be set using the `DaprClientBuilder` in two ways:
|
||||
|
||||
1. Using individual property overrides (recommended for most cases):
|
||||
```java
|
||||
import io.dapr.config.Properties;
|
||||
|
||||
// Set a single property override
|
||||
DaprClient client = new DaprClientBuilder()
|
||||
.withPropertyOverride(Properties.GRPC_ENABLE_KEEP_ALIVE, "true")
|
||||
.build();
|
||||
|
||||
// Or set multiple property overrides
|
||||
DaprClient client = new DaprClientBuilder()
|
||||
.withPropertyOverride(Properties.GRPC_ENABLE_KEEP_ALIVE, "true")
|
||||
.withPropertyOverride(Properties.HTTP_CLIENT_READ_TIMEOUT_SECONDS, "120")
|
||||
.build();
|
||||
```
|
||||
|
||||
2. Using a Properties instance (useful when you have many properties to set at once):
|
||||
```java
|
||||
// Create a map of property overrides
|
||||
Map<String, String> overrides = new HashMap<>();
|
||||
overrides.put("dapr.grpc.enable.keep.alive", "true");
|
||||
overrides.put("dapr.http.client.readTimeoutSeconds", "120");
|
||||
|
||||
// Create a Properties instance with overrides
|
||||
Properties properties = new Properties(overrides);
|
||||
|
||||
// Use these properties when creating a client
|
||||
DaprClient client = new DaprClientBuilder()
|
||||
.withProperties(properties)
|
||||
.build();
|
||||
```
|
||||
|
||||
For most use cases, you'll use system properties or environment variables. Override values are primarily used when you need different property values for different instances of the SDK in the same application.
|
||||
|
||||
## Proxy Configuration
|
||||
|
||||
You can configure proxy settings for your Java application using system properties. These are standard Java system properties that are part of Java's networking layer (`java.net` package), not specific to Dapr. They are used by Java's networking stack, including the HTTP client that Dapr's SDK uses.
|
||||
|
||||
For detailed information about Java's proxy configuration, including all available properties and their usage, see the [Java Networking Properties documentation](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/doc-files/net-properties.html).
|
||||
|
||||
|
||||
For example, here's how to configure a proxy:
|
||||
|
||||
```bash
|
||||
# Configure HTTP proxy - replace with your actual proxy server details
|
||||
java -Dhttp.proxyHost=your-proxy-server.com -Dhttp.proxyPort=8080 -jar myapp.jar
|
||||
|
||||
# Configure HTTPS proxy - replace with your actual proxy server details
|
||||
java -Dhttps.proxyHost=your-proxy-server.com -Dhttps.proxyPort=8443 -jar myapp.jar
|
||||
```
|
||||
|
||||
Replace `your-proxy-server.com` with your actual proxy server hostname or IP address, and adjust the port numbers to match your proxy server configuration.
|
||||
|
||||
These proxy settings will affect all HTTP/HTTPS connections made by your Java application, including connections to the Dapr sidecar.
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Jobs"
|
||||
linkTitle: "Jobs"
|
||||
weight: 3000
|
||||
description: With the Dapr Jobs package, you can interact with the Dapr Jobs APIs from a Java application to trigger future operations to run according to a predefined schedule with an optional payload. To get started, walk through the [Dapr Jobs]({{< ref java-jobs-howto.md >}}) how-to guide.
|
||||
---
|
|
@ -0,0 +1,164 @@
|
|||
---
|
||||
type: docs
|
||||
title: "How to: Author and manage Dapr Jobs in the Java SDK"
|
||||
linkTitle: "How to: Author and manage Jobs"
|
||||
weight: 20000
|
||||
description: How to get up and running with Jobs using the Dapr Java SDK
|
||||
---
|
||||
|
||||
As part of this demonstration we will schedule a Dapr Job. The scheduled job will trigger an endpoint registered in the
|
||||
same app. With the [provided jobs example](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/jobs), you will:
|
||||
|
||||
- Schedule a Job [Job scheduling example](https://github.com/dapr/java-sdk/blob/master/examples/src/main/java/io/dapr/examples/jobs/DemoJobsClient.java)
|
||||
- Register an endpoint for the dapr sidecar to invoke at trigger time [Endpoint Registration](https://github.com/dapr/java-sdk/blob/master/examples/src/main/java/io/dapr/examples/jobs/DemoJobsSpringApplication.java)
|
||||
|
||||
This example uses the default configuration from `dapr init` in [self-hosted mode](https://github.com/dapr/cli#install-dapr-on-your-local-machine-self-hosted).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started).
|
||||
- Java JDK 11 (or greater):
|
||||
- [Oracle JDK](https://www.oracle.com/java/technologies/downloads), or
|
||||
- OpenJDK
|
||||
- [Apache Maven](https://maven.apache.org/install.html), version 3.x.
|
||||
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
|
||||
|
||||
## Set up the environment
|
||||
|
||||
Clone the [Java SDK repo](https://github.com/dapr/java-sdk) and navigate into it.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/dapr/java-sdk.git
|
||||
cd java-sdk
|
||||
```
|
||||
|
||||
Run the following command to install the requirements for running the jobs example with the Dapr Java SDK.
|
||||
|
||||
```bash
|
||||
mvn clean install -DskipTests
|
||||
```
|
||||
|
||||
From the Java SDK root directory, navigate to the examples' directory.
|
||||
|
||||
```bash
|
||||
cd examples
|
||||
```
|
||||
|
||||
Run the Dapr sidecar.
|
||||
|
||||
```sh
|
||||
dapr run --app-id jobsapp --dapr-grpc-port 51439 --dapr-http-port 3500 --app-port 8080
|
||||
```
|
||||
|
||||
> Now, Dapr is listening for HTTP requests at `http://localhost:3500` and internal Jobs gRPC requests at `http://localhost:51439`.
|
||||
|
||||
## Schedule and Get a job
|
||||
|
||||
In the `DemoJobsClient` there are steps to schedule a job. Calling `scheduleJob` using the `DaprPreviewClient`
|
||||
will schedule a job with the Dapr Runtime.
|
||||
|
||||
```java
|
||||
public class DemoJobsClient {
|
||||
|
||||
/**
|
||||
* The main method of this app to schedule and get jobs.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
try (DaprPreviewClient client = new DaprClientBuilder().withPropertyOverrides(overrides).buildPreviewClient()) {
|
||||
|
||||
// Schedule a job.
|
||||
System.out.println("**** Scheduling a Job with name dapr-jobs-1 *****");
|
||||
ScheduleJobRequest scheduleJobRequest = new ScheduleJobRequest("dapr-job-1",
|
||||
JobSchedule.fromString("* * * * * *")).setData("Hello World!".getBytes());
|
||||
client.scheduleJob(scheduleJobRequest).block();
|
||||
|
||||
System.out.println("**** Scheduling job dapr-jobs-1 completed *****");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Call `getJob` to retrieve the job details that were previously created and scheduled.
|
||||
```
|
||||
client.getJob(new GetJobRequest("dapr-job-1")).block()
|
||||
```
|
||||
|
||||
Run the `DemoJobsClient` with the following command.
|
||||
|
||||
```sh
|
||||
java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.jobs.DemoJobsClient
|
||||
```
|
||||
|
||||
### Sample output
|
||||
```
|
||||
**** Scheduling a Job with name dapr-jobs-1 *****
|
||||
**** Scheduling job dapr-jobs-1 completed *****
|
||||
**** Retrieving a Job with name dapr-jobs-1 *****
|
||||
```
|
||||
|
||||
## Set up an endpoint to be invoked when the job is triggered
|
||||
|
||||
The `DemoJobsSpringApplication` class starts a Spring Boot application that registers the endpoints specified in the `JobsController`
|
||||
This endpoint acts like a callback for the scheduled job requests.
|
||||
|
||||
```java
|
||||
@RestController
|
||||
public class JobsController {
|
||||
|
||||
/**
|
||||
* Handles jobs callback from Dapr.
|
||||
*
|
||||
* @param jobName name of the job.
|
||||
* @param payload data from the job if payload exists.
|
||||
* @return Empty Mono.
|
||||
*/
|
||||
@PostMapping("/job/{jobName}")
|
||||
public Mono<Void> handleJob(@PathVariable("jobName") String jobName,
|
||||
@RequestBody(required = false) byte[] payload) {
|
||||
System.out.println("Job Name: " + jobName);
|
||||
System.out.println("Job Payload: " + new String(payload));
|
||||
|
||||
return Mono.empty();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
* `jobName`: The name of the triggered job.
|
||||
* `payload`: Optional payload data associated with the job (as a byte array).
|
||||
|
||||
Run the Spring Boot application with the following command.
|
||||
|
||||
```sh
|
||||
java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.jobs.DemoJobsSpringApplication
|
||||
```
|
||||
|
||||
### Sample output
|
||||
```
|
||||
Job Name: dapr-job-1
|
||||
Job Payload: Hello World!
|
||||
```
|
||||
|
||||
## Delete a scheduled job
|
||||
|
||||
```java
|
||||
public class DemoJobsClient {
|
||||
|
||||
/**
|
||||
* The main method of this app deletes a job that was previously scheduled.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
try (DaprPreviewClient client = new DaprClientBuilder().buildPreviewClient()) {
|
||||
|
||||
// Delete a job.
|
||||
System.out.println("**** Delete a Job with name dapr-jobs-1 *****");
|
||||
client.deleteJob(new DeleteJobRequest("dapr-job-1")).block();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Next steps
|
||||
- [Learn more about Jobs]({{< ref jobs-overview.md >}})
|
||||
- [Jobs API reference]({{< ref jobs_api.md >}})
|
|
@ -6,11 +6,6 @@ weight: 20000
|
|||
description: How to get up and running with workflows using the Dapr Java SDK
|
||||
---
|
||||
|
||||
{{% alert title="Note" color="primary" %}}
|
||||
Dapr Workflow is currently in beta. [See known limitations for {{% dapr-latest-version cli="true" %}}]({{< ref "workflow-overview.md#limitations" >}}).
|
||||
{{% /alert %}}
|
||||
|
||||
|
||||
Let’s create a Dapr workflow and invoke it using the console. With the [provided workflow example](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/workflows), you will:
|
||||
|
||||
- Execute the workflow instance using the [Java workflow worker](https://github.com/dapr/java-sdk/blob/master/examples/src/main/java/io/dapr/examples/workflows/DemoWorkflowWorker.java)
|
||||
|
@ -250,5 +245,5 @@ Exiting DemoWorkflowClient.
|
|||
1. The worfklow client is then exited.
|
||||
|
||||
## Next steps
|
||||
- [Learn more about Dapr workflow]({{< ref workflow >}})
|
||||
- [Learn more about Dapr workflow]({{< ref workflow-overview.md >}})
|
||||
- [Workflow API reference]({{< ref workflow_api.md >}})
|
|
@ -0,0 +1,335 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Getting started with the Dapr and Spring Boot"
|
||||
linkTitle: "Spring Boot Integration"
|
||||
weight: 4000
|
||||
description: How to get started with Dapr and Spring Boot
|
||||
---
|
||||
|
||||
By combining Dapr and Spring Boot, we can create infrastructure independent Java applications that can be deployed across different environments, supporting a wide range of on-premises and cloud provider services.
|
||||
|
||||
First, we will start with a simple integration covering the `DaprClient` and the [Testcontainers](https://testcontainers.com/) integration, to then use Spring and Spring Boot mechanisms and programming model to leverage the Dapr APIs under the hood. This helps teams to remove dependencies such as clients and drivers required to connect to environment-specific infrastructure (databases, key-value stores, message brokers, configuration/secret stores, etc)
|
||||
|
||||
{{% alert title="Note" color="primary" %}}
|
||||
The Spring Boot integration requires Spring Boot 3.x+ to work. This will not work with Spring Boot 2.x.
|
||||
The Spring Boot integration remains in alpha. We need your help and feedback to graduate it.
|
||||
Please join the [#java-sdk discord channel](https://discord.com/channels/778680217417809931/778749797242765342) discussion or open issues in the [dapr/java-sdk](https://github.com/dapr/java-sdk/issues).
|
||||
|
||||
{{% /alert %}}
|
||||
|
||||
|
||||
## Adding the Dapr and Spring Boot integration to your project
|
||||
|
||||
If you already have a Spring Boot application, you can directly add the following dependencies to your project:
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-starter</artifactId>
|
||||
<version>0.x.x</version> // see below for the latest versions
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.dapr.spring</groupId>
|
||||
<artifactId>dapr-spring-boot-starter-test</artifactId>
|
||||
<version>0.x.x</version> // see below for the latest versions
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
You can find the [latest released version here](https://central.sonatype.com/artifact/io.dapr.spring/dapr-spring-boot-starter).
|
||||
|
||||
By adding these dependencies, you can:
|
||||
- Autowire a `DaprClient` to use inside your applications
|
||||
- Use the Spring Data and Messaging abstractions and programming model that uses the Dapr APIs under the hood
|
||||
- Improve your inner-development loop by relying on [Testcontainers](https://testcontainers.com/) to bootstrap Dapr Control plane services and default components
|
||||
|
||||
Once these dependencies are in your application, you can rely on Spring Boot autoconfiguration to autowire a `DaprClient` instance:
|
||||
|
||||
```java
|
||||
@Autowired
|
||||
private DaprClient daprClient;
|
||||
|
||||
```
|
||||
|
||||
This will connect to the default Dapr gRPC endpoint `localhost:50001`, requiring you to start Dapr outside of your application.
|
||||
|
||||
You can use the `DaprClient` to interact with the Dapr APIs anywhere in your application, for example from inside a REST endpoint:
|
||||
|
||||
```java
|
||||
@RestController
|
||||
public class DemoRestController {
|
||||
@Autowired
|
||||
private DaprClient daprClient;
|
||||
|
||||
@PostMapping("/store")
|
||||
public void storeOrder(@RequestBody Order order){
|
||||
daprClient.saveState("kvstore", order.orderId(), order).block();
|
||||
}
|
||||
}
|
||||
|
||||
record Order(String orderId, Integer amount){}
|
||||
```
|
||||
|
||||
If you want to avoid managing Dapr outside of your Spring Boot application, you can rely on [Testcontainers](https://testcontainers.com/) to bootstrap Dapr beside your application for development purposes.
|
||||
To do this we can create a test configuration that uses `Testcontainers` to bootstrap all we need to develop our applications using the Dapr APIs.
|
||||
|
||||
Using [Testcontainers](https://testcontainers.com/) and Dapr integrations, we let the `@TestConfiguration` bootstrap Dapr for our applications.
|
||||
Notice that for this example, we are configuring Dapr with a Statestore component called `kvstore` that connects to an instance of `PostgreSQL` also bootstrapped by Testcontainers.
|
||||
|
||||
```java
|
||||
@TestConfiguration(proxyBeanMethods = false)
|
||||
public class DaprTestContainersConfig {
|
||||
@Bean
|
||||
@ServiceConnection
|
||||
public DaprContainer daprContainer(Network daprNetwork, PostgreSQLContainer<?> postgreSQLContainer){
|
||||
|
||||
return new DaprContainer("daprio/daprd:1.15.4")
|
||||
.withAppName("producer-app")
|
||||
.withNetwork(daprNetwork)
|
||||
.withComponent(new Component("kvstore", "state.postgresql", "v1", STATE_STORE_PROPERTIES))
|
||||
.withComponent(new Component("kvbinding", "bindings.postgresql", "v1", BINDING_PROPERTIES))
|
||||
.dependsOn(postgreSQLContainer);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Inside the test classpath you can add a new Spring Boot Application that uses this configuration for tests:
|
||||
|
||||
```java
|
||||
@SpringBootApplication
|
||||
public class TestProducerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication
|
||||
.from(ProducerApplication::main)
|
||||
.with(DaprTestContainersConfig.class)
|
||||
.run(args);
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Now you can start your application with:
|
||||
```bash
|
||||
mvn spring-boot:test-run
|
||||
```
|
||||
|
||||
Running this command will start the application, using the provided test configuration that includes the Testcontainers and Dapr integration. In the logs you should be able to see that the `daprd` and the `placement` service containers were started for your application.
|
||||
|
||||
Besides the previous configuration (`DaprTestContainersConfig`) your tests shouldn't be testing Dapr itself, just the REST endpoints that your application is exposing.
|
||||
|
||||
|
||||
## Leveraging Spring & Spring Boot programming model with Dapr
|
||||
|
||||
The Java SDK allows you to interface with all of the [Dapr building blocks]({{< ref building-blocks >}}).
|
||||
But if you want to leverage the Spring and Spring Boot programming model you can use the `dapr-spring-boot-starter` integration.
|
||||
This includes implementations of Spring Data (`KeyValueTemplate` and `CrudRepository`) as well as a `DaprMessagingTemplate` for producing and consuming messages
|
||||
(similar to [Spring Kafka](https://spring.io/projects/spring-kafka), [Spring Pulsar](https://spring.io/projects/spring-pulsar) and [Spring AMQP for RabbitMQ](https://spring.io/projects/spring-amqp)) and Dapr workflows.
|
||||
|
||||
## Using Spring Data `CrudRepository` and `KeyValueTemplate`
|
||||
|
||||
You can use well known Spring Data constructs relying on a Dapr-based implementation.
|
||||
With Dapr, you don't need to add any infrastructure-related driver or client, making your Spring application lighter and decoupled from the environment where it is running.
|
||||
|
||||
Under the hood these implementations use the Dapr Statestore and Binding APIs.
|
||||
|
||||
### Configuration parameters
|
||||
|
||||
With Spring Data abstractions you can configure which statestore and bindings will be used by Dapr to connect to the available infrastructure.
|
||||
This can be done by setting the following properties:
|
||||
|
||||
```properties
|
||||
dapr.statestore.name=kvstore
|
||||
dapr.statestore.binding=kvbinding
|
||||
```
|
||||
|
||||
Then you can `@Autowire` a `KeyValueTemplate` or a `CrudRepository` like this:
|
||||
|
||||
```java
|
||||
@RestController
|
||||
@EnableDaprRepositories
|
||||
public class OrdersRestController {
|
||||
@Autowired
|
||||
private OrderRepository repository;
|
||||
|
||||
@PostMapping("/orders")
|
||||
public void storeOrder(@RequestBody Order order){
|
||||
repository.save(order);
|
||||
}
|
||||
|
||||
@GetMapping("/orders")
|
||||
public Iterable<Order> getAll(){
|
||||
return repository.findAll();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Where `OrderRepository` is defined in an interface that extends the Spring Data `CrudRepository` interface:
|
||||
|
||||
```java
|
||||
public interface OrderRepository extends CrudRepository<Order, String> {}
|
||||
```
|
||||
|
||||
Notice that the `@EnableDaprRepositories` annotation does all the magic of wiring the Dapr APIs under the `CrudRespository` interface.
|
||||
Because Dapr allow users to interact with different StateStores from the same application, as a user you need to provide the following beans as a Spring Boot `@Configuration`:
|
||||
|
||||
```java
|
||||
@Configuration
|
||||
@EnableConfigurationProperties({DaprStateStoreProperties.class})
|
||||
public class ProducerAppConfiguration {
|
||||
|
||||
@Bean
|
||||
public KeyValueAdapterResolver keyValueAdapterResolver(DaprClient daprClient, ObjectMapper mapper, DaprStateStoreProperties daprStatestoreProperties) {
|
||||
String storeName = daprStatestoreProperties.getName();
|
||||
String bindingName = daprStatestoreProperties.getBinding();
|
||||
|
||||
return new DaprKeyValueAdapterResolver(daprClient, mapper, storeName, bindingName);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public DaprKeyValueTemplate daprKeyValueTemplate(KeyValueAdapterResolver keyValueAdapterResolver) {
|
||||
return new DaprKeyValueTemplate(keyValueAdapterResolver);
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Using Spring Messaging for producing and consuming events
|
||||
|
||||
Similar to Spring Kafka, Spring Pulsar and Spring AMQP you can use the `DaprMessagingTemplate` to publish messages to the configured infrastructure. To consume messages you can use the `@Topic` annotation (soon to be renamed to `@DaprListener`).
|
||||
|
||||
To publish events/messages you can `@Autowired` the `DaprMessagingTemplate` in your Spring application.
|
||||
For this example we will be publishing `Order` events and we are sending messages to the topic named `topic`.
|
||||
|
||||
```java
|
||||
@Autowired
|
||||
private DaprMessagingTemplate<Order> messagingTemplate;
|
||||
|
||||
@PostMapping("/orders")
|
||||
public void storeOrder(@RequestBody Order order){
|
||||
repository.save(order);
|
||||
messagingTemplate.send("topic", order);
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Similarly to the `CrudRepository` we need to specify which PubSub broker do we want to use to publish and consume our messages.
|
||||
|
||||
```properties
|
||||
dapr.pubsub.name=pubsub
|
||||
```
|
||||
|
||||
Because with Dapr you can connect to multiple PubSub brokers you need to provide the following bean to let Dapr know which PubSub broker your `DaprMessagingTemplate` will use:
|
||||
```java
|
||||
@Bean
|
||||
public DaprMessagingTemplate<Order> messagingTemplate(DaprClient daprClient,
|
||||
DaprPubSubProperties daprPubSubProperties) {
|
||||
return new DaprMessagingTemplate<>(daprClient, daprPubSubProperties.getName());
|
||||
}
|
||||
```
|
||||
|
||||
Finally, because Dapr PubSub requires a bidirectional connection between your application and Dapr you need to expand your Testcontainers configuration with a few parameters:
|
||||
|
||||
```java
|
||||
@Bean
|
||||
@ServiceConnection
|
||||
public DaprContainer daprContainer(Network daprNetwork, PostgreSQLContainer<?> postgreSQLContainer, RabbitMQContainer rabbitMQContainer){
|
||||
|
||||
return new DaprContainer("daprio/daprd:1.15.4")
|
||||
.withAppName("producer-app")
|
||||
.withNetwork(daprNetwork)
|
||||
.withComponent(new Component("kvstore", "state.postgresql", "v1", STATE_STORE_PROPERTIES))
|
||||
.withComponent(new Component("kvbinding", "bindings.postgresql", "v1", BINDING_PROPERTIES))
|
||||
.withComponent(new Component("pubsub", "pubsub.rabbitmq", "v1", rabbitMqProperties))
|
||||
.withAppPort(8080)
|
||||
.withAppChannelAddress("host.testcontainers.internal")
|
||||
.dependsOn(rabbitMQContainer)
|
||||
.dependsOn(postgreSQLContainer);
|
||||
}
|
||||
```
|
||||
|
||||
Now, in the Dapr configuration we have included a `pubsub` component that will connect to an instance of RabbitMQ started by Testcontainers.
|
||||
We have also set two important parameters `.withAppPort(8080)` and `.withAppChannelAddress("host.testcontainers.internal")` which allows Dapr to
|
||||
contact back to the application when a message is published in the broker.
|
||||
|
||||
To listen to events/messages you need to expose an endpoint in the application that will be responsible to receive the messages.
|
||||
If you expose a REST endpoint you can use the `@Topic` annotation to let Dapr know where it needs to forward the events/messages too:
|
||||
|
||||
```java
|
||||
@PostMapping("subscribe")
|
||||
@Topic(pubsubName = "pubsub", name = "topic")
|
||||
public void subscribe(@RequestBody CloudEvent<Order> cloudEvent){
|
||||
events.add(cloudEvent);
|
||||
}
|
||||
```
|
||||
|
||||
Upon bootstrapping your application, Dapr will register the subscription to messages to be forwarded to the `subscribe` endpoint exposed by your application.
|
||||
|
||||
If you are writing tests for these subscribers you need to ensure that Testcontainers knows that your application will be running on port 8080,
|
||||
so containers started with Testcontainers know where your application is:
|
||||
|
||||
```java
|
||||
@BeforeAll
|
||||
public static void setup(){
|
||||
org.testcontainers.Testcontainers.exposeHostPorts(8080);
|
||||
}
|
||||
```
|
||||
|
||||
You can check and run the [full example source code here](https://github.com/salaboy/dapr-spring-boot-docs-examples).
|
||||
|
||||
## Using Dapr Workflows with Spring Boot
|
||||
|
||||
Following the same approach that we used for Spring Data and Spring Messaging, the `dapr-spring-boot-starter` brings Dapr Workflow integration for Spring Boot users.
|
||||
|
||||
To work with Dapr Workflows you need to define and implement your workflows using code. The Dapr Spring Boot Starter makes your life easier by managing `Workflow`s and `WorkflowActivity`s as Spring beans.
|
||||
|
||||
In order to enable the automatic bean discovery you can annotate your `@SpringBootApplication` with the `@EnableDaprWorkflows` annotation:
|
||||
|
||||
```
|
||||
@SpringBootApplication
|
||||
@EnableDaprWorkflows
|
||||
public class MySpringBootApplication {}
|
||||
```
|
||||
|
||||
By adding this annotation, all the `WorkflowActivity`s will be automatically managed by Spring and registered to the workflow engine.
|
||||
|
||||
By having all `WorkflowActivity`s as managed beans we can use Spring `@Autowired` mechanism to inject any bean that our workflow activity might need to implement its functionality, for example the `@RestTemplate`:
|
||||
|
||||
```
|
||||
public class MyWorkflowActivity implements WorkflowActivity {
|
||||
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
```
|
||||
|
||||
You can also `@Autowired` the `DaprWorkflowClient` to create new instances of your workflows.
|
||||
|
||||
```
|
||||
@Autowired
|
||||
private DaprWorkflowClient daprWorkflowClient;
|
||||
```
|
||||
|
||||
This enable applications to schedule new workflow instances and raise events.
|
||||
|
||||
```
|
||||
String instanceId = daprWorkflowClient.scheduleNewWorkflow(MyWorkflow.class, payload);
|
||||
```
|
||||
|
||||
and
|
||||
|
||||
```
|
||||
daprWorkflowClient.raiseEvent(instanceId, "MyEvenet", event);
|
||||
```
|
||||
|
||||
Check the [Dapr Workflow documentation](https://docs.dapr.io/developing-applications/building-blocks/workflow/workflow-overview/) for more information about how to work with Dapr Workflows.
|
||||
|
||||
|
||||
## Next steps
|
||||
|
||||
Learn more about the [Dapr Java SDK packages available to add to your Java applications](https://dapr.github.io/java-sdk/).
|
||||
|
||||
## Related links
|
||||
- [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples)
|
|
@ -1,479 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (11.0.19) on Sun Jun 11 23:10:23 PDT 2023 -->
|
||||
<title>All Classes (dapr-sdk-parent 1.9.0 API)</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2023-06-11">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script>
|
||||
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="jquery/jquery-3.6.1.min.js"></script>
|
||||
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<main role="main">
|
||||
<h1 class="bar">All Classes</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="io/dapr/actors/runtime/AbstractActor.html" title="class in io.dapr.actors.runtime">AbstractActor</a></li>
|
||||
<li><a href="io/dapr/actors/client/ActorClient.html" title="class in io.dapr.actors.client">ActorClient</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorFactory.html" title="interface in io.dapr.actors.runtime"><span class="interfaceName">ActorFactory</span></a></li>
|
||||
<li><a href="io/dapr/actors/ActorId.html" title="class in io.dapr.actors">ActorId</a></li>
|
||||
<li><a href="io/dapr/actors/ActorMethod.html" title="annotation in io.dapr.actors">ActorMethod</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorMethodContext.html" title="class in io.dapr.actors.runtime">ActorMethodContext</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorObjectSerializer.html" title="class in io.dapr.actors.runtime">ActorObjectSerializer</a></li>
|
||||
<li><a href="io/dapr/actors/client/ActorProxy.html" title="interface in io.dapr.actors.client"><span class="interfaceName">ActorProxy</span></a></li>
|
||||
<li><a href="io/dapr/actors/client/ActorProxyBuilder.html" title="class in io.dapr.actors.client">ActorProxyBuilder</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorRuntime.html" title="class in io.dapr.actors.runtime">ActorRuntime</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorRuntimeConfig.html" title="class in io.dapr.actors.runtime">ActorRuntimeConfig</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorRuntimeContext.html" title="class in io.dapr.actors.runtime">ActorRuntimeContext</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorStateChange.html" title="class in io.dapr.actors.runtime">ActorStateChange</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorStateChangeKind.html" title="enum in io.dapr.actors.runtime">ActorStateChangeKind</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/ActorStateManager.html" title="class in io.dapr.actors.runtime">ActorStateManager</a></li>
|
||||
<li><a href="io/dapr/actors/ActorTrace.html" title="class in io.dapr.actors">ActorTrace</a></li>
|
||||
<li><a href="io/dapr/actors/ActorType.html" title="annotation in io.dapr.actors">ActorType</a></li>
|
||||
<li><a href="io/dapr/actors/ActorUtils.html" title="class in io.dapr.actors">ActorUtils</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/filters/AndFilter.html" title="class in io.dapr.client.domain.query.filters">AndFilter</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackAlphaGrpc.html" title="class in io.dapr.v1">AppCallbackAlphaGrpc</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackAlphaGrpc.AppCallbackAlphaBlockingStub.html" title="class in io.dapr.v1">AppCallbackAlphaGrpc.AppCallbackAlphaBlockingStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackAlphaGrpc.AppCallbackAlphaFutureStub.html" title="class in io.dapr.v1">AppCallbackAlphaGrpc.AppCallbackAlphaFutureStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackAlphaGrpc.AppCallbackAlphaImplBase.html" title="class in io.dapr.v1">AppCallbackAlphaGrpc.AppCallbackAlphaImplBase</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackAlphaGrpc.AppCallbackAlphaStub.html" title="class in io.dapr.v1">AppCallbackAlphaGrpc.AppCallbackAlphaStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackGrpc.html" title="class in io.dapr.v1">AppCallbackGrpc</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackGrpc.AppCallbackBlockingStub.html" title="class in io.dapr.v1">AppCallbackGrpc.AppCallbackBlockingStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackGrpc.AppCallbackFutureStub.html" title="class in io.dapr.v1">AppCallbackGrpc.AppCallbackFutureStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackGrpc.AppCallbackImplBase.html" title="class in io.dapr.v1">AppCallbackGrpc.AppCallbackImplBase</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackGrpc.AppCallbackStub.html" title="class in io.dapr.v1">AppCallbackGrpc.AppCallbackStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackHealthCheckGrpc.html" title="class in io.dapr.v1">AppCallbackHealthCheckGrpc</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackHealthCheckGrpc.AppCallbackHealthCheckBlockingStub.html" title="class in io.dapr.v1">AppCallbackHealthCheckGrpc.AppCallbackHealthCheckBlockingStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackHealthCheckGrpc.AppCallbackHealthCheckFutureStub.html" title="class in io.dapr.v1">AppCallbackHealthCheckGrpc.AppCallbackHealthCheckFutureStub</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackHealthCheckGrpc.AppCallbackHealthCheckImplBase.html" title="class in io.dapr.v1">AppCallbackHealthCheckGrpc.AppCallbackHealthCheckImplBase</a></li>
|
||||
<li><a href="io/dapr/v1/AppCallbackHealthCheckGrpc.AppCallbackHealthCheckStub.html" title="class in io.dapr.v1">AppCallbackHealthCheckGrpc.AppCallbackHealthCheckStub</a></li>
|
||||
<li><a href="io/dapr/config/BooleanProperty.html" title="class in io.dapr.config">BooleanProperty</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkPublishEntry.html" title="class in io.dapr.client.domain">BulkPublishEntry</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkPublishRequest.html" title="class in io.dapr.client.domain">BulkPublishRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkPublishResponse.html" title="class in io.dapr.client.domain">BulkPublishResponse</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkPublishResponseFailedEntry.html" title="class in io.dapr.client.domain">BulkPublishResponseFailedEntry</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkSubscribeAppResponse.html" title="class in io.dapr.client.domain">BulkSubscribeAppResponse</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkSubscribeAppResponseEntry.html" title="class in io.dapr.client.domain">BulkSubscribeAppResponseEntry</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkSubscribeAppResponseStatus.html" title="enum in io.dapr.client.domain">BulkSubscribeAppResponseStatus</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkSubscribeMessage.html" title="class in io.dapr.client.domain">BulkSubscribeMessage</a></li>
|
||||
<li><a href="io/dapr/client/domain/BulkSubscribeMessageEntry.html" title="class in io.dapr.client.domain">BulkSubscribeMessageEntry</a></li>
|
||||
<li><a href="io/dapr/client/domain/CloudEvent.html" title="class in io.dapr.client.domain">CloudEvent</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.html" title="class in io.dapr.v1">CommonProtos</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.ConfigurationItem.html" title="class in io.dapr.v1">CommonProtos.ConfigurationItem</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.ConfigurationItem.Builder.html" title="class in io.dapr.v1">CommonProtos.ConfigurationItem.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.ConfigurationItemOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.ConfigurationItemOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.Etag.html" title="class in io.dapr.v1">CommonProtos.Etag</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.Etag.Builder.html" title="class in io.dapr.v1">CommonProtos.Etag.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.EtagOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.EtagOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.HTTPExtension.html" title="class in io.dapr.v1">CommonProtos.HTTPExtension</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.HTTPExtension.Builder.html" title="class in io.dapr.v1">CommonProtos.HTTPExtension.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.HTTPExtension.Verb.html" title="enum in io.dapr.v1">CommonProtos.HTTPExtension.Verb</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.HTTPExtensionOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.HTTPExtensionOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.InvokeRequest.html" title="class in io.dapr.v1">CommonProtos.InvokeRequest</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.InvokeRequest.Builder.html" title="class in io.dapr.v1">CommonProtos.InvokeRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.InvokeRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.InvokeRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.InvokeResponse.html" title="class in io.dapr.v1">CommonProtos.InvokeResponse</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.InvokeResponse.Builder.html" title="class in io.dapr.v1">CommonProtos.InvokeResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.InvokeResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.InvokeResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateItem.html" title="class in io.dapr.v1">CommonProtos.StateItem</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateItem.Builder.html" title="class in io.dapr.v1">CommonProtos.StateItem.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateItemOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.StateItemOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateOptions.html" title="class in io.dapr.v1">CommonProtos.StateOptions</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateOptions.Builder.html" title="class in io.dapr.v1">CommonProtos.StateOptions.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateOptions.StateConcurrency.html" title="enum in io.dapr.v1">CommonProtos.StateOptions.StateConcurrency</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateOptions.StateConsistency.html" title="enum in io.dapr.v1">CommonProtos.StateOptions.StateConsistency</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StateOptionsOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.StateOptionsOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StreamPayload.html" title="class in io.dapr.v1">CommonProtos.StreamPayload</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StreamPayload.Builder.html" title="class in io.dapr.v1">CommonProtos.StreamPayload.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/CommonProtos.StreamPayloadOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">CommonProtos.StreamPayloadOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/client/domain/ConfigurationItem.html" title="class in io.dapr.client.domain">ConfigurationItem</a></li>
|
||||
<li><a href="io/dapr/client/DaprApiProtocol.html" title="enum in io.dapr.client">DaprApiProtocol</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.html" title="class in io.dapr.v1">DaprAppCallbackProtos</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BindingEventRequest.html" title="class in io.dapr.v1">DaprAppCallbackProtos.BindingEventRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BindingEventRequest.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.BindingEventRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BindingEventRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.BindingEventRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BindingEventResponse.html" title="class in io.dapr.v1">DaprAppCallbackProtos.BindingEventResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BindingEventResponse.BindingEventConcurrency.html" title="enum in io.dapr.v1">DaprAppCallbackProtos.BindingEventResponse.BindingEventConcurrency</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BindingEventResponse.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.BindingEventResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BindingEventResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.BindingEventResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BulkSubscribeConfig.html" title="class in io.dapr.v1">DaprAppCallbackProtos.BulkSubscribeConfig</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BulkSubscribeConfig.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.BulkSubscribeConfig.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.BulkSubscribeConfigOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.BulkSubscribeConfigOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.HealthCheckResponse.html" title="class in io.dapr.v1">DaprAppCallbackProtos.HealthCheckResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.HealthCheckResponse.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.HealthCheckResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.HealthCheckResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.HealthCheckResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.ListInputBindingsResponse.html" title="class in io.dapr.v1">DaprAppCallbackProtos.ListInputBindingsResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.ListInputBindingsResponse.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.ListInputBindingsResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.ListInputBindingsResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.ListInputBindingsResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.ListTopicSubscriptionsResponse.html" title="class in io.dapr.v1">DaprAppCallbackProtos.ListTopicSubscriptionsResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.ListTopicSubscriptionsResponse.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.ListTopicSubscriptionsResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.ListTopicSubscriptionsResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.ListTopicSubscriptionsResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkRequest.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkRequest.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkRequestEntry.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkRequestEntry</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkRequestEntry.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkRequestEntry.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkRequestEntry.EventCase.html" title="enum in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkRequestEntry.EventCase</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkRequestEntryOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicEventBulkRequestEntryOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicEventBulkRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkResponse.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkResponse.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkResponseEntry.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkResponseEntry</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkResponseEntry.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventBulkResponseEntry.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkResponseEntryOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicEventBulkResponseEntryOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventBulkResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicEventBulkResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventCERequest.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventCERequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventCERequest.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventCERequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventCERequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicEventCERequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventRequest.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventRequest.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicEventRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventResponse.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventResponse.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicEventResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventResponse.TopicEventResponseStatus.html" title="enum in io.dapr.v1">DaprAppCallbackProtos.TopicEventResponse.TopicEventResponseStatus</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicEventResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicEventResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicRoutes.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicRoutes</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicRoutes.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicRoutes.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicRoutesOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicRoutesOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicRule.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicRule</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicRule.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicRule.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicRuleOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicRuleOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicSubscription.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicSubscription</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicSubscription.Builder.html" title="class in io.dapr.v1">DaprAppCallbackProtos.TopicSubscription.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprAppCallbackProtos.TopicSubscriptionOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprAppCallbackProtos.TopicSubscriptionOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/client/DaprClient.html" title="interface in io.dapr.client"><span class="interfaceName">DaprClient</span></a></li>
|
||||
<li><a href="io/dapr/client/DaprClientBuilder.html" title="class in io.dapr.client">DaprClientBuilder</a></li>
|
||||
<li><a href="io/dapr/client/DaprClientGrpc.html" title="class in io.dapr.client">DaprClientGrpc</a></li>
|
||||
<li><a href="io/dapr/client/DaprClientHttp.html" title="class in io.dapr.client">DaprClientHttp</a></li>
|
||||
<li><a href="io/dapr/exceptions/DaprError.html" title="class in io.dapr.exceptions">DaprError</a></li>
|
||||
<li><a href="io/dapr/exceptions/DaprException.html" title="class in io.dapr.exceptions">DaprException</a></li>
|
||||
<li><a href="io/dapr/v1/DaprGrpc.html" title="class in io.dapr.v1">DaprGrpc</a></li>
|
||||
<li><a href="io/dapr/v1/DaprGrpc.DaprBlockingStub.html" title="class in io.dapr.v1">DaprGrpc.DaprBlockingStub</a></li>
|
||||
<li><a href="io/dapr/v1/DaprGrpc.DaprFutureStub.html" title="class in io.dapr.v1">DaprGrpc.DaprFutureStub</a></li>
|
||||
<li><a href="io/dapr/v1/DaprGrpc.DaprImplBase.html" title="class in io.dapr.v1">DaprGrpc.DaprImplBase</a></li>
|
||||
<li><a href="io/dapr/v1/DaprGrpc.DaprStub.html" title="class in io.dapr.v1">DaprGrpc.DaprStub</a></li>
|
||||
<li><a href="io/dapr/client/DaprHttp.html" title="class in io.dapr.client">DaprHttp</a></li>
|
||||
<li><a href="io/dapr/client/DaprHttp.HttpMethods.html" title="enum in io.dapr.client">DaprHttp.HttpMethods</a></li>
|
||||
<li><a href="io/dapr/client/DaprHttp.Response.html" title="class in io.dapr.client">DaprHttp.Response</a></li>
|
||||
<li><a href="io/dapr/client/DaprHttpBuilder.html" title="class in io.dapr.client">DaprHttpBuilder</a></li>
|
||||
<li><a href="io/dapr/serializer/DaprObjectSerializer.html" title="interface in io.dapr.serializer"><span class="interfaceName">DaprObjectSerializer</span></a></li>
|
||||
<li><a href="io/dapr/client/DaprPreviewClient.html" title="interface in io.dapr.client"><span class="interfaceName">DaprPreviewClient</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.html" title="class in io.dapr.v1">DaprProtos</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ActiveActorsCount.html" title="class in io.dapr.v1">DaprProtos.ActiveActorsCount</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ActiveActorsCount.Builder.html" title="class in io.dapr.v1">DaprProtos.ActiveActorsCount.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ActiveActorsCountOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.ActiveActorsCountOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishRequest.html" title="class in io.dapr.v1">DaprProtos.BulkPublishRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.BulkPublishRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishRequestEntry.html" title="class in io.dapr.v1">DaprProtos.BulkPublishRequestEntry</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishRequestEntry.Builder.html" title="class in io.dapr.v1">DaprProtos.BulkPublishRequestEntry.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishRequestEntryOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.BulkPublishRequestEntryOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.BulkPublishRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishResponse.html" title="class in io.dapr.v1">DaprProtos.BulkPublishResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.BulkPublishResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishResponseFailedEntry.html" title="class in io.dapr.v1">DaprProtos.BulkPublishResponseFailedEntry</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishResponseFailedEntry.Builder.html" title="class in io.dapr.v1">DaprProtos.BulkPublishResponseFailedEntry.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishResponseFailedEntryOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.BulkPublishResponseFailedEntryOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkPublishResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.BulkPublishResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkStateItem.html" title="class in io.dapr.v1">DaprProtos.BulkStateItem</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkStateItem.Builder.html" title="class in io.dapr.v1">DaprProtos.BulkStateItem.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.BulkStateItemOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.BulkStateItemOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptRequest.html" title="class in io.dapr.v1">DaprProtos.DecryptRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.DecryptRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptRequestOptions.html" title="class in io.dapr.v1">DaprProtos.DecryptRequestOptions</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptRequestOptions.Builder.html" title="class in io.dapr.v1">DaprProtos.DecryptRequestOptions.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptRequestOptionsOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.DecryptRequestOptionsOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.DecryptRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptResponse.html" title="class in io.dapr.v1">DaprProtos.DecryptResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.DecryptResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DecryptResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.DecryptResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DeleteBulkStateRequest.html" title="class in io.dapr.v1">DaprProtos.DeleteBulkStateRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DeleteBulkStateRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.DeleteBulkStateRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DeleteBulkStateRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.DeleteBulkStateRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DeleteStateRequest.html" title="class in io.dapr.v1">DaprProtos.DeleteStateRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DeleteStateRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.DeleteStateRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.DeleteStateRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.DeleteStateRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptRequest.html" title="class in io.dapr.v1">DaprProtos.EncryptRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.EncryptRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptRequestOptions.html" title="class in io.dapr.v1">DaprProtos.EncryptRequestOptions</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptRequestOptions.Builder.html" title="class in io.dapr.v1">DaprProtos.EncryptRequestOptions.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptRequestOptionsOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.EncryptRequestOptionsOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.EncryptRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptResponse.html" title="class in io.dapr.v1">DaprProtos.EncryptResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.EncryptResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.EncryptResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.EncryptResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ExecuteActorStateTransactionRequest.html" title="class in io.dapr.v1">DaprProtos.ExecuteActorStateTransactionRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ExecuteActorStateTransactionRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.ExecuteActorStateTransactionRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ExecuteActorStateTransactionRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.ExecuteActorStateTransactionRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ExecuteStateTransactionRequest.html" title="class in io.dapr.v1">DaprProtos.ExecuteStateTransactionRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ExecuteStateTransactionRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.ExecuteStateTransactionRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ExecuteStateTransactionRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.ExecuteStateTransactionRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetActorStateRequest.html" title="class in io.dapr.v1">DaprProtos.GetActorStateRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetActorStateRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.GetActorStateRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetActorStateRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetActorStateRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetActorStateResponse.html" title="class in io.dapr.v1">DaprProtos.GetActorStateResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetActorStateResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetActorStateResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetActorStateResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetActorStateResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkSecretRequest.html" title="class in io.dapr.v1">DaprProtos.GetBulkSecretRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkSecretRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.GetBulkSecretRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkSecretRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetBulkSecretRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkSecretResponse.html" title="class in io.dapr.v1">DaprProtos.GetBulkSecretResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkSecretResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetBulkSecretResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkSecretResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetBulkSecretResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkStateRequest.html" title="class in io.dapr.v1">DaprProtos.GetBulkStateRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkStateRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.GetBulkStateRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkStateRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetBulkStateRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkStateResponse.html" title="class in io.dapr.v1">DaprProtos.GetBulkStateResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkStateResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetBulkStateResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetBulkStateResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetBulkStateResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetConfigurationRequest.html" title="class in io.dapr.v1">DaprProtos.GetConfigurationRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetConfigurationRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.GetConfigurationRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetConfigurationRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetConfigurationRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetConfigurationResponse.html" title="class in io.dapr.v1">DaprProtos.GetConfigurationResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetConfigurationResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetConfigurationResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetConfigurationResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetConfigurationResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetMetadataResponse.html" title="class in io.dapr.v1">DaprProtos.GetMetadataResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetMetadataResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetMetadataResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetMetadataResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetMetadataResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetSecretRequest.html" title="class in io.dapr.v1">DaprProtos.GetSecretRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetSecretRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.GetSecretRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetSecretRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetSecretRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetSecretResponse.html" title="class in io.dapr.v1">DaprProtos.GetSecretResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetSecretResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetSecretResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetSecretResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetSecretResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetStateRequest.html" title="class in io.dapr.v1">DaprProtos.GetStateRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetStateRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.GetStateRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetStateRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetStateRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetStateResponse.html" title="class in io.dapr.v1">DaprProtos.GetStateResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetStateResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetStateResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetStateResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetStateResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetWorkflowRequest.html" title="class in io.dapr.v1">DaprProtos.GetWorkflowRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetWorkflowRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.GetWorkflowRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetWorkflowRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetWorkflowRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetWorkflowResponse.html" title="class in io.dapr.v1">DaprProtos.GetWorkflowResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetWorkflowResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.GetWorkflowResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.GetWorkflowResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.GetWorkflowResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeActorRequest.html" title="class in io.dapr.v1">DaprProtos.InvokeActorRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeActorRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.InvokeActorRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeActorRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.InvokeActorRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeActorResponse.html" title="class in io.dapr.v1">DaprProtos.InvokeActorResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeActorResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.InvokeActorResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeActorResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.InvokeActorResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeBindingRequest.html" title="class in io.dapr.v1">DaprProtos.InvokeBindingRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeBindingRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.InvokeBindingRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeBindingRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.InvokeBindingRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeBindingResponse.html" title="class in io.dapr.v1">DaprProtos.InvokeBindingResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeBindingResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.InvokeBindingResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeBindingResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.InvokeBindingResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeServiceRequest.html" title="class in io.dapr.v1">DaprProtos.InvokeServiceRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeServiceRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.InvokeServiceRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.InvokeServiceRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.InvokeServiceRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PauseWorkflowRequest.html" title="class in io.dapr.v1">DaprProtos.PauseWorkflowRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PauseWorkflowRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.PauseWorkflowRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PauseWorkflowRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.PauseWorkflowRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PublishEventRequest.html" title="class in io.dapr.v1">DaprProtos.PublishEventRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PublishEventRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.PublishEventRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PublishEventRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.PublishEventRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscription.html" title="class in io.dapr.v1">DaprProtos.PubsubSubscription</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscription.Builder.html" title="class in io.dapr.v1">DaprProtos.PubsubSubscription.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscriptionOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.PubsubSubscriptionOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscriptionRule.html" title="class in io.dapr.v1">DaprProtos.PubsubSubscriptionRule</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscriptionRule.Builder.html" title="class in io.dapr.v1">DaprProtos.PubsubSubscriptionRule.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscriptionRuleOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.PubsubSubscriptionRuleOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscriptionRules.html" title="class in io.dapr.v1">DaprProtos.PubsubSubscriptionRules</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscriptionRules.Builder.html" title="class in io.dapr.v1">DaprProtos.PubsubSubscriptionRules.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PubsubSubscriptionRulesOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.PubsubSubscriptionRulesOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PurgeWorkflowRequest.html" title="class in io.dapr.v1">DaprProtos.PurgeWorkflowRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PurgeWorkflowRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.PurgeWorkflowRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.PurgeWorkflowRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.PurgeWorkflowRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateItem.html" title="class in io.dapr.v1">DaprProtos.QueryStateItem</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateItem.Builder.html" title="class in io.dapr.v1">DaprProtos.QueryStateItem.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateItemOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.QueryStateItemOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateRequest.html" title="class in io.dapr.v1">DaprProtos.QueryStateRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.QueryStateRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.QueryStateRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateResponse.html" title="class in io.dapr.v1">DaprProtos.QueryStateResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.QueryStateResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.QueryStateResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.QueryStateResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RaiseEventWorkflowRequest.html" title="class in io.dapr.v1">DaprProtos.RaiseEventWorkflowRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RaiseEventWorkflowRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.RaiseEventWorkflowRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RaiseEventWorkflowRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.RaiseEventWorkflowRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisterActorReminderRequest.html" title="class in io.dapr.v1">DaprProtos.RegisterActorReminderRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisterActorReminderRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.RegisterActorReminderRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisterActorReminderRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.RegisterActorReminderRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisterActorTimerRequest.html" title="class in io.dapr.v1">DaprProtos.RegisterActorTimerRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisterActorTimerRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.RegisterActorTimerRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisterActorTimerRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.RegisterActorTimerRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisteredComponents.html" title="class in io.dapr.v1">DaprProtos.RegisteredComponents</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisteredComponents.Builder.html" title="class in io.dapr.v1">DaprProtos.RegisteredComponents.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RegisteredComponentsOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.RegisteredComponentsOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RenameActorReminderRequest.html" title="class in io.dapr.v1">DaprProtos.RenameActorReminderRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RenameActorReminderRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.RenameActorReminderRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.RenameActorReminderRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.RenameActorReminderRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ResumeWorkflowRequest.html" title="class in io.dapr.v1">DaprProtos.ResumeWorkflowRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ResumeWorkflowRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.ResumeWorkflowRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.ResumeWorkflowRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.ResumeWorkflowRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SaveStateRequest.html" title="class in io.dapr.v1">DaprProtos.SaveStateRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SaveStateRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SaveStateRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SaveStateRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SaveStateRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SecretResponse.html" title="class in io.dapr.v1">DaprProtos.SecretResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SecretResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SecretResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SecretResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SecretResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SetMetadataRequest.html" title="class in io.dapr.v1">DaprProtos.SetMetadataRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SetMetadataRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SetMetadataRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SetMetadataRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SetMetadataRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.StartWorkflowRequest.html" title="class in io.dapr.v1">DaprProtos.StartWorkflowRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.StartWorkflowRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.StartWorkflowRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.StartWorkflowRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.StartWorkflowRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.StartWorkflowResponse.html" title="class in io.dapr.v1">DaprProtos.StartWorkflowResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.StartWorkflowResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.StartWorkflowResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.StartWorkflowResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.StartWorkflowResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubscribeConfigurationRequest.html" title="class in io.dapr.v1">DaprProtos.SubscribeConfigurationRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubscribeConfigurationRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubscribeConfigurationRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubscribeConfigurationRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubscribeConfigurationRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubscribeConfigurationResponse.html" title="class in io.dapr.v1">DaprProtos.SubscribeConfigurationResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubscribeConfigurationResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubscribeConfigurationResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubscribeConfigurationResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubscribeConfigurationResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleDecryptRequest.html" title="class in io.dapr.v1">DaprProtos.SubtleDecryptRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleDecryptRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleDecryptRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleDecryptRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleDecryptRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleDecryptResponse.html" title="class in io.dapr.v1">DaprProtos.SubtleDecryptResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleDecryptResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleDecryptResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleDecryptResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleDecryptResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleEncryptRequest.html" title="class in io.dapr.v1">DaprProtos.SubtleEncryptRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleEncryptRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleEncryptRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleEncryptRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleEncryptRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleEncryptResponse.html" title="class in io.dapr.v1">DaprProtos.SubtleEncryptResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleEncryptResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleEncryptResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleEncryptResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleEncryptResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleGetKeyRequest.html" title="class in io.dapr.v1">DaprProtos.SubtleGetKeyRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleGetKeyRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleGetKeyRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleGetKeyRequest.KeyFormat.html" title="enum in io.dapr.v1">DaprProtos.SubtleGetKeyRequest.KeyFormat</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleGetKeyRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleGetKeyRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleGetKeyResponse.html" title="class in io.dapr.v1">DaprProtos.SubtleGetKeyResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleGetKeyResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleGetKeyResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleGetKeyResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleGetKeyResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleSignRequest.html" title="class in io.dapr.v1">DaprProtos.SubtleSignRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleSignRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleSignRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleSignRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleSignRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleSignResponse.html" title="class in io.dapr.v1">DaprProtos.SubtleSignResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleSignResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleSignResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleSignResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleSignResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleUnwrapKeyRequest.html" title="class in io.dapr.v1">DaprProtos.SubtleUnwrapKeyRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleUnwrapKeyRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleUnwrapKeyRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleUnwrapKeyRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleUnwrapKeyRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleUnwrapKeyResponse.html" title="class in io.dapr.v1">DaprProtos.SubtleUnwrapKeyResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleUnwrapKeyResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleUnwrapKeyResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleUnwrapKeyResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleUnwrapKeyResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleVerifyRequest.html" title="class in io.dapr.v1">DaprProtos.SubtleVerifyRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleVerifyRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleVerifyRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleVerifyRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleVerifyRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleVerifyResponse.html" title="class in io.dapr.v1">DaprProtos.SubtleVerifyResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleVerifyResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleVerifyResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleVerifyResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleVerifyResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleWrapKeyRequest.html" title="class in io.dapr.v1">DaprProtos.SubtleWrapKeyRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleWrapKeyRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleWrapKeyRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleWrapKeyRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleWrapKeyRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleWrapKeyResponse.html" title="class in io.dapr.v1">DaprProtos.SubtleWrapKeyResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleWrapKeyResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.SubtleWrapKeyResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.SubtleWrapKeyResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.SubtleWrapKeyResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TerminateWorkflowRequest.html" title="class in io.dapr.v1">DaprProtos.TerminateWorkflowRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TerminateWorkflowRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.TerminateWorkflowRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TerminateWorkflowRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.TerminateWorkflowRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TransactionalActorStateOperation.html" title="class in io.dapr.v1">DaprProtos.TransactionalActorStateOperation</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TransactionalActorStateOperation.Builder.html" title="class in io.dapr.v1">DaprProtos.TransactionalActorStateOperation.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TransactionalActorStateOperationOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.TransactionalActorStateOperationOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TransactionalStateOperation.html" title="class in io.dapr.v1">DaprProtos.TransactionalStateOperation</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TransactionalStateOperation.Builder.html" title="class in io.dapr.v1">DaprProtos.TransactionalStateOperation.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TransactionalStateOperationOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.TransactionalStateOperationOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TryLockRequest.html" title="class in io.dapr.v1">DaprProtos.TryLockRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TryLockRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.TryLockRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TryLockRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.TryLockRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TryLockResponse.html" title="class in io.dapr.v1">DaprProtos.TryLockResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TryLockResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.TryLockResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.TryLockResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.TryLockResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnlockRequest.html" title="class in io.dapr.v1">DaprProtos.UnlockRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnlockRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.UnlockRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnlockRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.UnlockRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnlockResponse.html" title="class in io.dapr.v1">DaprProtos.UnlockResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnlockResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.UnlockResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnlockResponse.Status.html" title="enum in io.dapr.v1">DaprProtos.UnlockResponse.Status</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnlockResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.UnlockResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnregisterActorReminderRequest.html" title="class in io.dapr.v1">DaprProtos.UnregisterActorReminderRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnregisterActorReminderRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.UnregisterActorReminderRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnregisterActorReminderRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.UnregisterActorReminderRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnregisterActorTimerRequest.html" title="class in io.dapr.v1">DaprProtos.UnregisterActorTimerRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnregisterActorTimerRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.UnregisterActorTimerRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnregisterActorTimerRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.UnregisterActorTimerRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnsubscribeConfigurationRequest.html" title="class in io.dapr.v1">DaprProtos.UnsubscribeConfigurationRequest</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnsubscribeConfigurationRequest.Builder.html" title="class in io.dapr.v1">DaprProtos.UnsubscribeConfigurationRequest.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnsubscribeConfigurationRequestOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.UnsubscribeConfigurationRequestOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnsubscribeConfigurationResponse.html" title="class in io.dapr.v1">DaprProtos.UnsubscribeConfigurationResponse</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnsubscribeConfigurationResponse.Builder.html" title="class in io.dapr.v1">DaprProtos.UnsubscribeConfigurationResponse.Builder</a></li>
|
||||
<li><a href="io/dapr/v1/DaprProtos.UnsubscribeConfigurationResponseOrBuilder.html" title="interface in io.dapr.v1"><span class="interfaceName">DaprProtos.UnsubscribeConfigurationResponseOrBuilder</span></a></li>
|
||||
<li><a href="io/dapr/utils/DefaultContentTypeConverter.html" title="class in io.dapr.utils">DefaultContentTypeConverter</a></li>
|
||||
<li><a href="io/dapr/serializer/DefaultObjectSerializer.html" title="class in io.dapr.serializer">DefaultObjectSerializer</a></li>
|
||||
<li><a href="io/dapr/client/domain/DeleteStateRequest.html" title="class in io.dapr.client.domain">DeleteStateRequest</a></li>
|
||||
<li><a href="io/dapr/utils/DurationUtils.html" title="class in io.dapr.utils">DurationUtils</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/filters/EqFilter.html" title="class in io.dapr.client.domain.query.filters">EqFilter</a></li>
|
||||
<li><a href="io/dapr/client/domain/ExecuteStateTransactionRequest.html" title="class in io.dapr.client.domain">ExecuteStateTransactionRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/filters/Filter.html" title="class in io.dapr.client.domain.query.filters">Filter</a></li>
|
||||
<li><a href="io/dapr/config/GenericProperty.html" title="class in io.dapr.config">GenericProperty</a></li>
|
||||
<li><a href="io/dapr/client/domain/GetBulkSecretRequest.html" title="class in io.dapr.client.domain">GetBulkSecretRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/GetBulkStateRequest.html" title="class in io.dapr.client.domain">GetBulkStateRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/GetConfigurationRequest.html" title="class in io.dapr.client.domain">GetConfigurationRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/GetSecretRequest.html" title="class in io.dapr.client.domain">GetSecretRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/GetStateRequest.html" title="class in io.dapr.client.domain">GetStateRequest</a></li>
|
||||
<li><a href="io/dapr/internal/opencensus/GrpcWrapper.html" title="class in io.dapr.internal.opencensus">GrpcWrapper</a></li>
|
||||
<li><a href="io/dapr/client/domain/HttpExtension.html" title="class in io.dapr.client.domain">HttpExtension</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/filters/InFilter.html" title="class in io.dapr.client.domain.query.filters">InFilter</a></li>
|
||||
<li><a href="io/dapr/config/IntegerProperty.html" title="class in io.dapr.config">IntegerProperty</a></li>
|
||||
<li><a href="io/dapr/client/domain/InvokeBindingRequest.html" title="class in io.dapr.client.domain">InvokeBindingRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/InvokeMethodRequest.html" title="class in io.dapr.client.domain">InvokeMethodRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/Metadata.html" title="class in io.dapr.client.domain">Metadata</a></li>
|
||||
<li><a href="io/dapr/utils/NetworkUtils.html" title="class in io.dapr.utils">NetworkUtils</a></li>
|
||||
<li><a href="io/dapr/client/ObjectSerializer.html" title="class in io.dapr.client">ObjectSerializer</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/filters/OrFilter.html" title="class in io.dapr.client.domain.query.filters">OrFilter</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/Pagination.html" title="class in io.dapr.client.domain.query">Pagination</a></li>
|
||||
<li><a href="io/dapr/config/Properties.html" title="class in io.dapr.config">Properties</a></li>
|
||||
<li><a href="io/dapr/config/Property.html" title="class in io.dapr.config">Property</a></li>
|
||||
<li><a href="io/dapr/client/domain/PublishEventRequest.html" title="class in io.dapr.client.domain">PublishEventRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/Query.html" title="class in io.dapr.client.domain.query">Query</a></li>
|
||||
<li><a href="io/dapr/client/domain/QueryStateItem.html" title="class in io.dapr.client.domain">QueryStateItem</a></li>
|
||||
<li><a href="io/dapr/client/domain/QueryStateRequest.html" title="class in io.dapr.client.domain">QueryStateRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/QueryStateResponse.html" title="class in io.dapr.client.domain">QueryStateResponse</a></li>
|
||||
<li><a href="io/dapr/actors/runtime/Remindable.html" title="interface in io.dapr.actors.runtime"><span class="interfaceName">Remindable</span></a></li>
|
||||
<li><a href="io/dapr/Rule.html" title="annotation in io.dapr">Rule</a></li>
|
||||
<li><a href="io/dapr/client/domain/SaveStateRequest.html" title="class in io.dapr.client.domain">SaveStateRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/Sorting.html" title="class in io.dapr.client.domain.query">Sorting</a></li>
|
||||
<li><a href="io/dapr/client/domain/query/Sorting.Order.html" title="enum in io.dapr.client.domain.query">Sorting.Order</a></li>
|
||||
<li><a href="io/dapr/client/domain/State.html" title="class in io.dapr.client.domain">State</a></li>
|
||||
<li><a href="io/dapr/client/domain/StateOptions.html" title="class in io.dapr.client.domain">StateOptions</a></li>
|
||||
<li><a href="io/dapr/client/domain/StateOptions.Concurrency.html" title="enum in io.dapr.client.domain">StateOptions.Concurrency</a></li>
|
||||
<li><a href="io/dapr/client/domain/StateOptions.Consistency.html" title="enum in io.dapr.client.domain">StateOptions.Consistency</a></li>
|
||||
<li><a href="io/dapr/client/domain/StateOptions.StateOptionDurationDeserializer.html" title="class in io.dapr.client.domain">StateOptions.StateOptionDurationDeserializer</a></li>
|
||||
<li><a href="io/dapr/client/domain/StateOptions.StateOptionDurationSerializer.html" title="class in io.dapr.client.domain">StateOptions.StateOptionDurationSerializer</a></li>
|
||||
<li><a href="io/dapr/config/StringProperty.html" title="class in io.dapr.config">StringProperty</a></li>
|
||||
<li><a href="io/dapr/client/domain/SubscribeConfigurationRequest.html" title="class in io.dapr.client.domain">SubscribeConfigurationRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/SubscribeConfigurationResponse.html" title="class in io.dapr.client.domain">SubscribeConfigurationResponse</a></li>
|
||||
<li><a href="io/dapr/Topic.html" title="annotation in io.dapr">Topic</a></li>
|
||||
<li><a href="io/dapr/client/domain/TransactionalStateOperation.html" title="class in io.dapr.client.domain">TransactionalStateOperation</a></li>
|
||||
<li><a href="io/dapr/client/domain/TransactionalStateOperation.OperationType.html" title="enum in io.dapr.client.domain">TransactionalStateOperation.OperationType</a></li>
|
||||
<li><a href="io/dapr/client/domain/TransactionalStateRequest.html" title="class in io.dapr.client.domain">TransactionalStateRequest</a></li>
|
||||
<li><a href="io/dapr/utils/TypeRef.html" title="class in io.dapr.utils">TypeRef</a></li>
|
||||
<li><a href="io/dapr/client/domain/UnsubscribeConfigurationRequest.html" title="class in io.dapr.client.domain">UnsubscribeConfigurationRequest</a></li>
|
||||
<li><a href="io/dapr/client/domain/UnsubscribeConfigurationResponse.html" title="class in io.dapr.client.domain">UnsubscribeConfigurationResponse</a></li>
|
||||
<li><a href="io/dapr/utils/Version.html" title="class in io.dapr.utils">Version</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
|
@ -1,51 +1,33 @@
|
|||
<!DOCTYPE HTML>
|
||||
<!-- NewPage -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (11.0.19) on Sun Jun 11 23:10:23 PDT 2023 -->
|
||||
<title>All Packages (dapr-sdk-parent 1.9.0 API)</title>
|
||||
<!-- Generated by javadoc (17) on Wed Apr 30 13:47:35 UTC 2025 -->
|
||||
<title>All Packages (dapr-sdk-parent 1.14.1 API)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2023-06-11">
|
||||
<meta name="dc.created" content="2025-04-30">
|
||||
<meta name="description" content="package index">
|
||||
<meta name="generator" content="javadoc/AllPackagesIndexWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="jquery/jszip/dist/jszip.min.js"></script>
|
||||
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils.min.js"></script>
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="jquery/jquery-3.6.1.min.js"></script>
|
||||
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="All Packages (dapr-sdk-parent 1.9.0 API)";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
var pathtoroot = "./";
|
||||
var useModuleDirectories = true;
|
||||
<body class="all-packages-index-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<header role="banner">
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<div class="fixedNav">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a id="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a id="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<div class="top-nav" id="navbar-top">
|
||||
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
|
@ -53,168 +35,104 @@ loadScripts(document, 'script');</script>
|
|||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
<li><a href="help-doc.html#all-packages">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses.html">All Classes</a></li>
|
||||
</ul>
|
||||
<ul class="navListSearch">
|
||||
<li><label for="search">SEARCH:</label>
|
||||
<input type="text" id="search" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset" value="reset" disabled="disabled">
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
|
||||
<input type="text" id="search-input" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset-button" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<a id="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
</div>
|
||||
<div class="navPadding"> </div>
|
||||
<script type="text/javascript"><!--
|
||||
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
|
||||
//-->
|
||||
</script>
|
||||
</nav>
|
||||
<span class="skip-nav" id="skip-navbar-top"></span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="All&nbsp;Packages" class="title">All Packages</h1>
|
||||
</div>
|
||||
<div class="allPackagesContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<table class="packagesSummary">
|
||||
<caption><span>Package Summary</span><span class="tabEnd"> </span></caption>
|
||||
<tr>
|
||||
<th class="colFirst" scope="col">Package</th>
|
||||
<th class="colLast" scope="col">Description</th>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/package-summary.html">io.dapr</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/actors/package-summary.html">io.dapr.actors</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/actors/client/package-summary.html">io.dapr.actors.client</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/actors/runtime/package-summary.html">io.dapr.actors.runtime</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/client/package-summary.html">io.dapr.client</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/client/domain/package-summary.html">io.dapr.client.domain</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/client/domain/query/package-summary.html">io.dapr.client.domain.query</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/client/domain/query/filters/package-summary.html">io.dapr.client.domain.query.filters</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/config/package-summary.html">io.dapr.config</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/exceptions/package-summary.html">io.dapr.exceptions</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/internal/opencensus/package-summary.html">io.dapr.internal.opencensus</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/serializer/package-summary.html">io.dapr.serializer</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="altColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/utils/package-summary.html">io.dapr.utils</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
<tr class="rowColor">
|
||||
<th class="colFirst" scope="row"><a href="io/dapr/v1/package-summary.html">io.dapr.v1</a></th>
|
||||
<td class="colLast"> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="caption"><span>Package Summary</span></div>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Package</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/package-summary.html">io.dapr</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/actors/package-summary.html">io.dapr.actors</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/actors/client/package-summary.html">io.dapr.actors.client</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/actors/runtime/package-summary.html">io.dapr.actors.runtime</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/client/package-summary.html">io.dapr.client</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/client/domain/package-summary.html">io.dapr.client.domain</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/client/domain/query/package-summary.html">io.dapr.client.domain.query</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/client/domain/query/filters/package-summary.html">io.dapr.client.domain.query.filters</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/client/resiliency/package-summary.html">io.dapr.client.resiliency</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/config/package-summary.html">io.dapr.config</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/exceptions/package-summary.html">io.dapr.exceptions</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/internal/exceptions/package-summary.html">io.dapr.internal.exceptions</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/internal/grpc/package-summary.html">io.dapr.internal.grpc</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/internal/grpc/interceptors/package-summary.html">io.dapr.internal.grpc.interceptors</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/internal/opencensus/package-summary.html">io.dapr.internal.opencensus</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/internal/resiliency/package-summary.html">io.dapr.internal.resiliency</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/serializer/package-summary.html">io.dapr.serializer</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/spring/boot/autoconfigure/client/package-summary.html">io.dapr.spring.boot.autoconfigure.client</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/spring/boot/autoconfigure/pubsub/package-summary.html">io.dapr.spring.boot.autoconfigure.pubsub</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/spring/boot/autoconfigure/statestore/package-summary.html">io.dapr.spring.boot.autoconfigure.statestore</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/spring/boot/testcontainers/service/connection/package-summary.html">io.dapr.spring.boot.testcontainers.service.connection</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/spring/data/package-summary.html">io.dapr.spring.data</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/spring/data/repository/config/package-summary.html">io.dapr.spring.data.repository.config</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/spring/data/repository/query/package-summary.html">io.dapr.spring.data.repository.query</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/spring/messaging/package-summary.html">io.dapr.spring.messaging</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/spring/messaging/observation/package-summary.html">io.dapr.spring.messaging.observation</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/spring/workflows/config/package-summary.html">io.dapr.spring.workflows.config</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/testcontainers/package-summary.html">io.dapr.testcontainers</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/testcontainers/converter/package-summary.html">io.dapr.testcontainers.converter</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/utils/package-summary.html">io.dapr.utils</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/v1/package-summary.html">io.dapr.v1</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/workflows/package-summary.html">io.dapr.workflows</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/workflows/client/package-summary.html">io.dapr.workflows.client</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/workflows/internal/package-summary.html">io.dapr.workflows.internal</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/workflows/runtime/package-summary.html">io.dapr.workflows.runtime</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<nav role="navigation">
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a id="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<a id="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li>Use</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="deprecated-list.html">Deprecated</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses.html">All Classes</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
</div>
|
||||
<a id="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</nav>
|
||||
<p class="legalCopy"><small>Copyright © 2023. All rights reserved.</small></p>
|
||||
<hr>
|
||||
<p class="legal-copy"><small>Copyright © 2025. All rights reserved.</small></p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -0,0 +1,138 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Wed Apr 30 13:51:53 UTC 2025 -->
|
||||
<title>All Classes and Interfaces (dapr-sdk-workflows 0.14.1 API)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2025-04-30">
|
||||
<meta name="description" content="class index">
|
||||
<meta name="generator" content="javadoc/AllClassesIndexWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="all-classes-index-page">
|
||||
<script type="text/javascript">var evenRowColor = "even-row-color";
|
||||
var oddRowColor = "odd-row-color";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar-top">
|
||||
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li>Use</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html#all-classes">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
|
||||
<input type="text" id="search-input" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset-button" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip-navbar-top"></span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="All Classes and Interfaces" class="title">All Classes and Interfaces</h1>
|
||||
</div>
|
||||
<div id="all-classes-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="all-classes-table-tab0" role="tab" aria-selected="true" aria-controls="all-classes-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('all-classes-table', 'all-classes-table', 2)" class="active-table-tab">All Classes and Interfaces</button><button id="all-classes-table-tab1" role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('all-classes-table', 'all-classes-table-tab1', 2)" class="table-tab">Interfaces</button><button id="all-classes-table-tab2" role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('all-classes-table', 'all-classes-table-tab2', 2)" class="table-tab">Classes</button><button id="all-classes-table-tab3" role="tab" aria-selected="false" aria-controls="all-classes-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('all-classes-table', 'all-classes-table-tab3', 2)" class="table-tab">Enums</button></div>
|
||||
<div id="all-classes-table.tabpanel" role="tabpanel" aria-labelledby="all-classes-table-tab0">
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Class</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/internal/ApiTokenClientInterceptor.html" title="class in io.dapr.workflows.internal">ApiTokenClientInterceptor</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2"> </div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/client/DaprWorkflowClient.html" title="class in io.dapr.workflows.client">DaprWorkflowClient</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
|
||||
<div class="block">Defines client operations for managing Dapr Workflow instances.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/runtime/DefaultWorkflowContext.html" title="class in io.dapr.workflows.runtime">DefaultWorkflowContext</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2"> </div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/client/NewWorkflowOptions.html" title="class in io.dapr.workflows.client">NewWorkflowOptions</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
|
||||
<div class="block">Options for starting a new instance of a workflow.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab1"><a href="io/dapr/workflows/Workflow.html" title="interface in io.dapr.workflows">Workflow</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab1">
|
||||
<div class="block">Common interface for workflow implementations.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab1"><a href="io/dapr/workflows/WorkflowActivity.html" title="interface in io.dapr.workflows">WorkflowActivity</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab1">
|
||||
<div class="block">Common interface for task activity implementations.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/runtime/WorkflowActivityClassWrapper.html" title="class in io.dapr.workflows.runtime">WorkflowActivityClassWrapper</a><<a href="io/dapr/workflows/runtime/WorkflowActivityClassWrapper.html" title="type parameter in WorkflowActivityClassWrapper">T</a> extends <a href="io/dapr/workflows/WorkflowActivity.html" title="interface in io.dapr.workflows">WorkflowActivity</a>></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
|
||||
<div class="block">Wrapper for Durable Task Framework task activity factory.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab1"><a href="io/dapr/workflows/WorkflowActivityContext.html" title="interface in io.dapr.workflows">WorkflowActivityContext</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab1"> </div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/runtime/WorkflowActivityInstanceWrapper.html" title="class in io.dapr.workflows.runtime">WorkflowActivityInstanceWrapper</a><<a href="io/dapr/workflows/runtime/WorkflowActivityInstanceWrapper.html" title="type parameter in WorkflowActivityInstanceWrapper">T</a> extends <a href="io/dapr/workflows/WorkflowActivity.html" title="interface in io.dapr.workflows">WorkflowActivity</a>></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
|
||||
<div class="block">Wrapper for Durable Task Framework task activity factory.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab1"><a href="io/dapr/workflows/WorkflowContext.html" title="interface in io.dapr.workflows">WorkflowContext</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab1">
|
||||
<div class="block">Context object used by workflow implementations to perform actions such as scheduling activities,
|
||||
durable timers, waiting for external events, and for getting basic information about the current
|
||||
workflow instance.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/client/WorkflowFailureDetails.html" title="class in io.dapr.workflows.client">WorkflowFailureDetails</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
|
||||
<div class="block">Represents a workflow failure details.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/client/WorkflowInstanceStatus.html" title="class in io.dapr.workflows.client">WorkflowInstanceStatus</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2">
|
||||
<div class="block">Represents a snapshot of a workflow instance's current state, including
|
||||
metadata.</div>
|
||||
</div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/runtime/WorkflowRuntime.html" title="class in io.dapr.workflows.runtime">WorkflowRuntime</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2">
|
||||
<div class="block">Contains methods to register workflows and activities.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/runtime/WorkflowRuntimeBuilder.html" title="class in io.dapr.workflows.runtime">WorkflowRuntimeBuilder</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2"> </div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab3"><a href="io/dapr/workflows/runtime/WorkflowRuntimeStatus.html" title="enum in io.dapr.workflows.runtime">WorkflowRuntimeStatus</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab3">
|
||||
<div class="block">Enum describing the runtime status of a workflow.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab1"><a href="io/dapr/workflows/WorkflowStub.html" title="interface in io.dapr.workflows">WorkflowStub</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab1"> </div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2"> </div>
|
||||
<div class="col-first odd-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/WorkflowTaskRetryPolicy.html" title="class in io.dapr.workflows">WorkflowTaskRetryPolicy</a></div>
|
||||
<div class="col-last odd-row-color all-classes-table all-classes-table-tab2"> </div>
|
||||
<div class="col-first even-row-color all-classes-table all-classes-table-tab2"><a href="io/dapr/workflows/WorkflowTaskRetryPolicy.Builder.html" title="class in io.dapr.workflows">WorkflowTaskRetryPolicy.Builder</a></div>
|
||||
<div class="col-last even-row-color all-classes-table all-classes-table-tab2"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<hr>
|
||||
<p class="legal-copy"><small>Copyright © 2025. All rights reserved.</small></p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,75 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Wed Apr 30 13:51:53 UTC 2025 -->
|
||||
<title>All Packages (dapr-sdk-workflows 0.14.1 API)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2025-04-30">
|
||||
<meta name="description" content="package index">
|
||||
<meta name="generator" content="javadoc/AllPackagesIndexWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="all-packages-index-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar-top">
|
||||
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li>Use</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li><a href="help-doc.html#all-packages">Help</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
|
||||
<input type="text" id="search-input" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset-button" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip-navbar-top"></span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="All&nbsp;Packages" class="title">All Packages</h1>
|
||||
</div>
|
||||
<div class="caption"><span>Package Summary</span></div>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Package</div>
|
||||
<div class="table-header col-last">Description</div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/workflows/package-summary.html">io.dapr.workflows</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/workflows/client/package-summary.html">io.dapr.workflows.client</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
<div class="col-first even-row-color"><a href="io/dapr/workflows/internal/package-summary.html">io.dapr.workflows.internal</a></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
<div class="col-first odd-row-color"><a href="io/dapr/workflows/runtime/package-summary.html">io.dapr.workflows.runtime</a></div>
|
||||
<div class="col-last odd-row-color"> </div>
|
||||
</div>
|
||||
</main>
|
||||
<footer role="contentinfo">
|
||||
<hr>
|
||||
<p class="legal-copy"><small>Copyright © 2025. All rights reserved.</small></p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,168 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
table {
|
||||
padding:0px;
|
||||
width: 100%;
|
||||
margin-left: -2px;
|
||||
margin-right: -2px;
|
||||
}
|
||||
acronym {
|
||||
cursor: help;
|
||||
border-bottom: 1px dotted #feb;
|
||||
}
|
||||
table.bodyTable th, table.bodyTable td {
|
||||
padding: 2px 4px 2px 4px;
|
||||
vertical-align: top;
|
||||
}
|
||||
div.clear{
|
||||
clear:both;
|
||||
visibility: hidden;
|
||||
}
|
||||
div.clear hr{
|
||||
display: none;
|
||||
}
|
||||
#bannerLeft, #bannerRight {
|
||||
font-size: xx-large;
|
||||
font-weight: bold;
|
||||
}
|
||||
#bannerLeft img, #bannerRight img {
|
||||
margin: 0px;
|
||||
}
|
||||
.xleft, #bannerLeft img {
|
||||
float:left;
|
||||
}
|
||||
.xright, #bannerRight {
|
||||
float:right;
|
||||
}
|
||||
#banner {
|
||||
padding: 0px;
|
||||
}
|
||||
#breadcrumbs {
|
||||
padding: 3px 10px 3px 10px;
|
||||
}
|
||||
#leftColumn {
|
||||
width: 170px;
|
||||
float:left;
|
||||
overflow: auto;
|
||||
}
|
||||
#bodyColumn {
|
||||
margin-right: 1.5em;
|
||||
margin-left: 197px;
|
||||
}
|
||||
#legend {
|
||||
padding: 8px 0 8px 0;
|
||||
}
|
||||
#navcolumn {
|
||||
padding: 8px 4px 0 8px;
|
||||
}
|
||||
#navcolumn h5 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: small;
|
||||
}
|
||||
#navcolumn ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: small;
|
||||
}
|
||||
#navcolumn li {
|
||||
list-style-type: none;
|
||||
background-image: none;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 0.4em;
|
||||
padding-left: 16px;
|
||||
list-style-position: outside;
|
||||
line-height: 1.2em;
|
||||
font-size: smaller;
|
||||
}
|
||||
#navcolumn li.expanded {
|
||||
background-image: url(../images/expanded.gif);
|
||||
}
|
||||
#navcolumn li.collapsed {
|
||||
background-image: url(../images/collapsed.gif);
|
||||
}
|
||||
#navcolumn li.none {
|
||||
text-indent: -1em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
#poweredBy {
|
||||
text-align: center;
|
||||
}
|
||||
#navcolumn img {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
#poweredBy img {
|
||||
display:block;
|
||||
margin: 20px 0 20px 17px;
|
||||
}
|
||||
#search img {
|
||||
margin: 0px;
|
||||
display: block;
|
||||
}
|
||||
#search #q, #search #btnG {
|
||||
border: 1px solid #999;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
#search form {
|
||||
margin: 0px;
|
||||
}
|
||||
#lastPublished {
|
||||
font-size: x-small;
|
||||
}
|
||||
.navSection {
|
||||
margin-bottom: 2px;
|
||||
padding: 8px;
|
||||
}
|
||||
.navSectionHead {
|
||||
font-weight: bold;
|
||||
font-size: x-small;
|
||||
}
|
||||
.section {
|
||||
padding: 4px;
|
||||
}
|
||||
#footer {
|
||||
padding: 3px 10px 3px 10px;
|
||||
font-size: x-small;
|
||||
}
|
||||
#breadcrumbs {
|
||||
font-size: x-small;
|
||||
margin: 0pt;
|
||||
}
|
||||
.source {
|
||||
padding: 12px;
|
||||
margin: 1em 7px 1em 7px;
|
||||
}
|
||||
.source pre {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
#navcolumn img.imageLink, .imageLink {
|
||||
padding-left: 0px;
|
||||
padding-bottom: 0px;
|
||||
padding-top: 0px;
|
||||
padding-right: 2px;
|
||||
border: 0px;
|
||||
margin: 0px;
|
||||
}
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
body {
|
||||
padding: 0px 0px 10px 0px;
|
||||
}
|
||||
body, td, select, input, li{
|
||||
font-family: Verdana, Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
code{
|
||||
font-family: Courier, monospace;
|
||||
font-size: 13px;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a:link {
|
||||
color:#36a;
|
||||
}
|
||||
a:visited {
|
||||
color:#47a;
|
||||
}
|
||||
a:active, a:hover {
|
||||
color:#69c;
|
||||
}
|
||||
#legend li.externalLink {
|
||||
background: url(../images/external.png) left top no-repeat;
|
||||
padding-left: 18px;
|
||||
}
|
||||
a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
|
||||
background: url(../images/external.png) right center no-repeat;
|
||||
padding-right: 18px;
|
||||
}
|
||||
#legend li.newWindow {
|
||||
background: url(../images/newwindow.png) left top no-repeat;
|
||||
padding-left: 18px;
|
||||
}
|
||||
a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
|
||||
background: url(../images/newwindow.png) right center no-repeat;
|
||||
padding-right: 18px;
|
||||
}
|
||||
h2 {
|
||||
padding: 4px 4px 4px 6px;
|
||||
border: 1px solid #999;
|
||||
color: #900;
|
||||
background-color: #ddd;
|
||||
font-weight:900;
|
||||
font-size: x-large;
|
||||
}
|
||||
h3 {
|
||||
padding: 4px 4px 4px 6px;
|
||||
border: 1px solid #aaa;
|
||||
color: #900;
|
||||
background-color: #eee;
|
||||
font-weight: normal;
|
||||
font-size: large;
|
||||
}
|
||||
h4 {
|
||||
padding: 4px 4px 4px 6px;
|
||||
border: 1px solid #bbb;
|
||||
color: #900;
|
||||
background-color: #fff;
|
||||
font-weight: normal;
|
||||
font-size: large;
|
||||
}
|
||||
h5 {
|
||||
padding: 4px 4px 4px 6px;
|
||||
color: #900;
|
||||
font-size: medium;
|
||||
}
|
||||
p {
|
||||
line-height: 1.3em;
|
||||
font-size: small;
|
||||
}
|
||||
#breadcrumbs {
|
||||
border-top: 1px solid #aaa;
|
||||
border-bottom: 1px solid #aaa;
|
||||
background-color: #ccc;
|
||||
}
|
||||
#leftColumn {
|
||||
margin: 10px 0 0 5px;
|
||||
border: 1px solid #999;
|
||||
background-color: #eee;
|
||||
padding-bottom: 3px; /* IE-9 scrollbar-fix */
|
||||
}
|
||||
#navcolumn h5 {
|
||||
font-size: smaller;
|
||||
border-bottom: 1px solid #aaaaaa;
|
||||
padding-top: 2px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
table.bodyTable th {
|
||||
color: white;
|
||||
background-color: #bbb;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table.bodyTable th, table.bodyTable td {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
table.bodyTable tr.a {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
table.bodyTable tr.b {
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
.source {
|
||||
border: 1px solid #999;
|
||||
}
|
||||
dl {
|
||||
padding: 4px 4px 4px 6px;
|
||||
border: 1px solid #aaa;
|
||||
background-color: #ffc;
|
||||
}
|
||||
dt {
|
||||
color: #900;
|
||||
}
|
||||
#organizationLogo img, #projectLogo img, #projectLogo span{
|
||||
margin: 8px;
|
||||
}
|
||||
#banner {
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
.errormark, .warningmark, .donemark, .infomark {
|
||||
background: url(../images/icon_error_sml.gif) no-repeat;
|
||||
}
|
||||
|
||||
.warningmark {
|
||||
background-image: url(../images/icon_warning_sml.gif);
|
||||
}
|
||||
|
||||
.donemark {
|
||||
background-image: url(../images/icon_success_sml.gif);
|
||||
}
|
||||
|
||||
.infomark {
|
||||
background-image: url(../images/icon_info_sml.gif);
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {
|
||||
display: none !important;
|
||||
}
|
||||
#bodyColumn, body.docs div.docs {
|
||||
margin: 0 !important;
|
||||
border: none !important
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
/* You can override this file with your own styles */
|
|
@ -0,0 +1,4 @@
|
|||
io.dapr.workflows
|
||||
io.dapr.workflows.client
|
||||
io.dapr.workflows.internal
|
||||
io.dapr.workflows.runtime
|
|
@ -0,0 +1,186 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- Generated by javadoc (17) on Wed Apr 30 13:51:53 UTC 2025 -->
|
||||
<title>API Help (dapr-sdk-workflows 0.14.1 API)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2025-04-30">
|
||||
<meta name="description" content="help">
|
||||
<meta name="generator" content="javadoc/HelpWriter">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="script-dir/jquery-ui.min.css" title="Style">
|
||||
<link rel="stylesheet" type="text/css" href="jquery-ui.overrides.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-3.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="script-dir/jquery-ui.min.js"></script>
|
||||
</head>
|
||||
<body class="help-page">
|
||||
<script type="text/javascript">var pathtoroot = "./";
|
||||
loadScripts(document, 'script');</script>
|
||||
<noscript>
|
||||
<div>JavaScript is disabled on your browser.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<header role="banner" class="flex-header">
|
||||
<nav role="navigation">
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="top-nav" id="navbar-top">
|
||||
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
|
||||
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
|
||||
<li><a href="index.html">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li>Use</li>
|
||||
<li><a href="overview-tree.html">Tree</a></li>
|
||||
<li><a href="index-all.html">Index</a></li>
|
||||
<li class="nav-bar-cell1-rev">Help</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="sub-nav">
|
||||
<div>
|
||||
<ul class="sub-nav-list">
|
||||
<li>Help: </li>
|
||||
<li><a href="#help-navigation">Navigation</a> | </li>
|
||||
<li><a href="#help-pages">Pages</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
|
||||
<input type="text" id="search-input" value="search" disabled="disabled">
|
||||
<input type="reset" id="reset-button" value="reset" disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<span class="skip-nav" id="skip-navbar-top"></span></nav>
|
||||
</header>
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<h1 class="title">JavaDoc Help</h1>
|
||||
<ul class="help-toc">
|
||||
<li><a href="#help-navigation">Navigation</a>:
|
||||
<ul class="help-subtoc">
|
||||
<li><a href="#help-search">Search</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#help-pages">Kinds of Pages</a>:
|
||||
<ul class="help-subtoc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#package">Package</a></li>
|
||||
<li><a href="#class">Class or Interface</a></li>
|
||||
<li><a href="#doc-file">Other Files</a></li>
|
||||
<li><a href="#use">Use</a></li>
|
||||
<li><a href="#tree">Tree (Class Hierarchy)</a></li>
|
||||
<li><a href="#all-packages">All Packages</a></li>
|
||||
<li><a href="#all-classes">All Classes and Interfaces</a></li>
|
||||
<li><a href="#index">Index</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
<div class="sub-title">
|
||||
<h2 id="help-navigation">Navigation</h2>
|
||||
Starting from the <a href="index.html">Overview</a> page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The <a href="index-all.html">Index</a> and Search box allow you to navigate to specific declarations and summary pages, including: <a href="allpackages-index.html">All Packages</a>, <a href="allclasses-index.html">All Classes and Interfaces</a>
|
||||
<section class="help-section" id="help-search">
|
||||
<h3>Search</h3>
|
||||
<p>You can search for definitions of modules, packages, types, fields, methods, system properties and other terms defined in the API, using some or all of the name, optionally using "camelCase" abbreviations. For example:</p>
|
||||
<ul class="help-section-list">
|
||||
<li><code>j.l.obj</code> will match "java.lang.Object"</li>
|
||||
<li><code>InpStr</code> will match "java.io.InputStream"</li>
|
||||
<li><code>HM.cK</code> will match "java.util.HashMap.containsKey(Object)"</li>
|
||||
</ul>
|
||||
<p>Refer to the <a href="https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/javadoc-search-spec.html">Javadoc Search Specification</a> for a full description of search features.</p>
|
||||
</section>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="sub-title">
|
||||
<h2 id="help-pages">Kinds of Pages</h2>
|
||||
The following sections describe the different kinds of pages in this collection.
|
||||
<section class="help-section" id="overview">
|
||||
<h3>Overview</h3>
|
||||
<p>The <a href="index.html">Overview</a> page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.</p>
|
||||
</section>
|
||||
<section class="help-section" id="package">
|
||||
<h3>Package</h3>
|
||||
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:</p>
|
||||
<ul class="help-section-list">
|
||||
<li>Interfaces</li>
|
||||
<li>Classes</li>
|
||||
<li>Enums</li>
|
||||
<li>Exceptions</li>
|
||||
<li>Errors</li>
|
||||
<li>Annotation Types</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="help-section" id="class">
|
||||
<h3>Class or Interface</h3>
|
||||
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.</p>
|
||||
<ul class="help-section-list">
|
||||
<li>Class Inheritance Diagram</li>
|
||||
<li>Direct Subclasses</li>
|
||||
<li>All Known Subinterfaces</li>
|
||||
<li>All Known Implementing Classes</li>
|
||||
<li>Class or Interface Declaration</li>
|
||||
<li>Class or Interface Description</li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="help-section-list">
|
||||
<li>Nested Class Summary</li>
|
||||
<li>Enum Constant Summary</li>
|
||||
<li>Field Summary</li>
|
||||
<li>Property Summary</li>
|
||||
<li>Constructor Summary</li>
|
||||
<li>Method Summary</li>
|
||||
<li>Required Element Summary</li>
|
||||
<li>Optional Element Summary</li>
|
||||
</ul>
|
||||
<br>
|
||||
<ul class="help-section-list">
|
||||
<li>Enum Constant Details</li>
|
||||
<li>Field Details</li>
|
||||
<li>Property Details</li>
|
||||
<li>Constructor Details</li>
|
||||
<li>Method Details</li>
|
||||
<li>Element Details</li>
|
||||
</ul>
|
||||
<p><span class="help-note">Note:</span> Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.</p>
|
||||
<p>The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
|
||||
</section>
|
||||
<section class="help-section" id="doc-file">
|
||||
<h3>Other Files</h3>
|
||||
<p>Packages and modules may contain pages with additional information related to the declarations nearby.</p>
|
||||
</section>
|
||||
<section class="help-section" id="use">
|
||||
<h3>Use</h3>
|
||||
<p>Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.</p>
|
||||
</section>
|
||||
<section class="help-section" id="tree">
|
||||
<h3>Tree (Class Hierarchy)</h3>
|
||||
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with <code>java.lang.Object</code>. Interfaces do not inherit from <code>java.lang.Object</code>.</p>
|
||||
<ul class="help-section-list">
|
||||
<li>When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.</li>
|
||||
<li>When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="help-section" id="all-packages">
|
||||
<h3>All Packages</h3>
|
||||
<p>The <a href="allpackages-index.html">All Packages</a> page contains an alphabetic index of all packages contained in the documentation.</p>
|
||||
</section>
|
||||
<section class="help-section" id="all-classes">
|
||||
<h3>All Classes and Interfaces</h3>
|
||||
<p>The <a href="allclasses-index.html">All Classes and Interfaces</a> page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.</p>
|
||||
</section>
|
||||
<section class="help-section" id="index">
|
||||
<h3>Index</h3>
|
||||
<p>The <a href="index-all.html">Index</a> contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as <a href="allpackages-index.html">All Packages</a>, <a href="allclasses-index.html">All Classes and Interfaces</a>.</p>
|
||||
</section>
|
||||
</div>
|
||||
<hr>
|
||||
<span class="help-footnote">This help file applies to API documentation generated by the standard doclet.</span></main>
|
||||
<footer role="contentinfo">
|
||||
<hr>
|
||||
<p class="legal-copy"><small>Copyright © 2025. All rights reserved.</small></p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 53 B |
After Width: | Height: | Size: 52 B |
After Width: | Height: | Size: 230 B |
After Width: | Height: | Size: 1010 B |
After Width: | Height: | Size: 606 B |
After Width: | Height: | Size: 990 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 220 B |