mirror of https://github.com/dapr/java-sdk.git
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:
parent
505b93acb5
commit
02733dcc15
|
@ -96,9 +96,13 @@ public class DaprClientAutoConfiguration {
|
||||||
private Properties createPropertiesFromConnectionDetails(DaprConnectionDetails daprConnectionDetails) {
|
private Properties createPropertiesFromConnectionDetails(DaprConnectionDetails daprConnectionDetails) {
|
||||||
final Map<String, String> propertyOverrides = new HashMap<>();
|
final Map<String, String> propertyOverrides = new HashMap<>();
|
||||||
propertyOverrides.put(Properties.HTTP_ENDPOINT.getName(), daprConnectionDetails.httpEndpoint());
|
propertyOverrides.put(Properties.HTTP_ENDPOINT.getName(), daprConnectionDetails.httpEndpoint());
|
||||||
|
if (daprConnectionDetails.httpPort() != null) {
|
||||||
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(daprConnectionDetails.httpPort()));
|
propertyOverrides.put(Properties.HTTP_PORT.getName(), String.valueOf(daprConnectionDetails.httpPort()));
|
||||||
|
}
|
||||||
propertyOverrides.put(Properties.GRPC_ENDPOINT.getName(), daprConnectionDetails.grpcEndpoint());
|
propertyOverrides.put(Properties.GRPC_ENDPOINT.getName(), daprConnectionDetails.grpcEndpoint());
|
||||||
|
if (daprConnectionDetails.grpcPort() != null) {
|
||||||
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(daprConnectionDetails.grpcPort()));
|
propertyOverrides.put(Properties.GRPC_PORT.getName(), String.valueOf(daprConnectionDetails.grpcPort()));
|
||||||
|
}
|
||||||
return new Properties(propertyOverrides);
|
return new Properties(propertyOverrides);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue