Skip to content

Commit 02733dc

Browse files
seal90cicoyle
andauthored
Fix the warn log issue caused by not setting the dapr.client.grpcPort variable (#1289)
Signed-off-by: seal90 <[email protected]> Co-authored-by: Cassie Coyle <[email protected]>
1 parent 505b93a commit 02733dc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

dapr-spring/dapr-spring-boot-autoconfigure/src/main/java/io/dapr/spring/boot/autoconfigure/client/DaprClientAutoConfiguration.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,13 @@ WorkflowRuntimeBuilder daprWorkflowRuntimeBuilder(DaprConnectionDetails daprConn
9696
private Properties createPropertiesFromConnectionDetails(DaprConnectionDetails daprConnectionDetails) {
9797
final Map<String, String> propertyOverrides = new HashMap<>();
9898
propertyOverrides.put(Properties.HTTP_ENDPOINT.getName(), daprConnectionDetails.httpEndpoint());
99-
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(daprConnectionDetails.httpPort()));
99+
if (daprConnectionDetails.httpPort() != null) {
100+
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(daprConnectionDetails.httpPort()));
101+
}
100102
propertyOverrides.put(Properties.GRPC_ENDPOINT.getName(), daprConnectionDetails.grpcEndpoint());
101-
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(daprConnectionDetails.grpcPort()));
103+
if (daprConnectionDetails.grpcPort() != null) {
104+
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(daprConnectionDetails.grpcPort()));
105+
}
102106
return new Properties(propertyOverrides);
103107
}
104108

0 commit comments

Comments
 (0)