Fix the warn log issue caused by not setting the dapr.client.grpcPort variable (#1289)

Signed-off-by: seal90 <578935869@qq.com>
Co-authored-by: Cassie Coyle <cassie@diagrid.io>
This commit is contained in:
seal90 2025-04-01 02:26:40 +08:00 committed by GitHub
parent 505b93acb5
commit 02733dcc15
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -96,9 +96,13 @@ public class DaprClientAutoConfiguration {
private Properties createPropertiesFromConnectionDetails(DaprConnectionDetails daprConnectionDetails) {
final Map<String, String> propertyOverrides = new HashMap<>();
propertyOverrides.put(Properties.HTTP_ENDPOINT.getName(), daprConnectionDetails.httpEndpoint());
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(daprConnectionDetails.httpPort()));
if (daprConnectionDetails.httpPort() != null) {
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(daprConnectionDetails.httpPort()));
}
propertyOverrides.put(Properties.GRPC_ENDPOINT.getName(), daprConnectionDetails.grpcEndpoint());
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(daprConnectionDetails.grpcPort()));
if (daprConnectionDetails.grpcPort() != null) {
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(daprConnectionDetails.grpcPort()));
}
return new Properties(propertyOverrides);
}