From b74bc29bd7ca8d39453f4f823b88ea7ac20b11aa Mon Sep 17 00:00:00 2001 From: Cassie Coyle Date: Fri, 15 Aug 2025 14:36:23 -0500 Subject: [PATCH 1/2] process deps too for dapr-spring (#1503) Signed-off-by: Cassandra Coyle --- .github/scripts/update_sdk_version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/update_sdk_version.sh b/.github/scripts/update_sdk_version.sh index f66d2adf2..4bf194d13 100755 --- a/.github/scripts/update_sdk_version.sh +++ b/.github/scripts/update_sdk_version.sh @@ -25,7 +25,7 @@ mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f sdk-workflows/pom. 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 +mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -DprocessDependencies=true -f dapr-spring/pom.xml # spring-boot-examples mvn versions:set -DnewVersion=$DAPR_JAVA_SDK_ALPHA_VERSION -f spring-boot-examples/pom.xml From 04b19e1cf7bff51cb0e64bd865a87eb92dd34ea6 Mon Sep 17 00:00:00 2001 From: Matheus Cruz <56329339+mcruzdev@users.noreply.github.com> Date: Sat, 16 Aug 2025 04:00:44 -0300 Subject: [PATCH 2/2] Use camelCase on properties (#1470) * Use camelCase on properties Signed-off-by: Matheus Cruz * Add test for cameCalse properties Signed-off-by: Matheus Cruz * Update daprdocs/content/en/java-sdk-docs/spring-boot/_index.md Co-authored-by: Cassie Coyle Signed-off-by: Matheus Cruz <56329339+mcruzdev@users.noreply.github.com> --------- Signed-off-by: Matheus Cruz Signed-off-by: Matheus Cruz <56329339+mcruzdev@users.noreply.github.com> Co-authored-by: artur-ciocanu Co-authored-by: Cassie Coyle --- .../client/DaprClientPropertiesTest.java | 19 +++++++++++++++++++ .../en/java-sdk-docs/spring-boot/_index.md | 12 ++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/client/DaprClientPropertiesTest.java b/dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/client/DaprClientPropertiesTest.java index 7a1781d13..33ea73989 100644 --- a/dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/client/DaprClientPropertiesTest.java +++ b/dapr-spring/dapr-spring-boot-autoconfigure/src/test/java/io/dapr/spring/boot/autoconfigure/client/DaprClientPropertiesTest.java @@ -83,7 +83,26 @@ public class DaprClientPropertiesTest { }); }); + } + @Test + @DisplayName("Should map DaprClient properties correctly (camelCase)") + public void shouldMapDaprClientPropertiesCamelCase() { + runner.withSystemProperties( + "dapr.client.httpEndpoint=http://localhost", + "dapr.client.httpPort=3500", + "dapr.client.grpcEndpoint=localhost", + "dapr.client.grpcPort=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) diff --git a/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md b/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md index b530d06cd..270d9899b 100644 --- a/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md +++ b/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md @@ -56,13 +56,13 @@ This will connect to the default Dapr gRPC endpoint `localhost:50001`, requiring {{% alert title="Note" color="primary" %}} By default, the following properties are preconfigured for `DaprClient` and `DaprWorkflowClient`: ```properties -dapr.client.http-endpoint=http://localhost -dapr.client.http-port=3500 -dapr.client.grpc-endpoint=localhost -dapr.client.grpc-port=50001 -dapr.client.api-token= +dapr.client.httpEndpoint=http://localhost +dapr.client.httpPort=3500 +dapr.client.grpcEndpoint=localhost +dapr.client.grpcPort=50001 +dapr.client.apiToken= ``` -These values are used by default, but you can override them in your `application.properties` file to suit your environment. +These values are used by default, but you can override them in your `application.properties` file to suit your environment. Please note that both kebab case and camel case are supported. {{% /alert %}} You can use the `DaprClient` to interact with the Dapr APIs anywhere in your application, for example from inside a REST endpoint: