From 7afaa1b6fcbefcf5182d43f1c9a69bbdfb8cbbc3 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Date: Fri, 25 Jul 2025 23:12:06 -0300 Subject: [PATCH 1/3] Use camelCase on properties Signed-off-by: Matheus Cruz --- .../content/en/java-sdk-docs/spring-boot/_index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 d4aa3887b..34102b4a4 100644 --- a/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md +++ b/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md @@ -56,11 +56,11 @@ 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. {{% /alert %}} From 8febfa87bb57e90bc449675a59ecb5233030959a Mon Sep 17 00:00:00 2001 From: Matheus Cruz Date: Sun, 27 Jul 2025 21:15:07 -0300 Subject: [PATCH 2/3] Add test for cameCalse properties Signed-off-by: Matheus Cruz --- .../client/DaprClientPropertiesTest.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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 void shouldMapDaprClientProperties() { }); }); + } + @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) From b6af2ce9241bbf1af6fc8277adbf555a76433158 Mon Sep 17 00:00:00 2001 From: Matheus Cruz <56329339+mcruzdev@users.noreply.github.com> Date: Wed, 6 Aug 2025 16:13:31 -0300 Subject: [PATCH 3/3] 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> --- daprdocs/content/en/java-sdk-docs/spring-boot/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ee9f25a86..730583b90 100644 --- a/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md +++ b/daprdocs/content/en/java-sdk-docs/spring-boot/_index.md @@ -62,7 +62,7 @@ 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: