Fixing port on Example.java

This commit is contained in:
Artur Souza 2019-12-06 11:17:03 -08:00 committed by GitHub
parent b10a6fd039
commit f89a53e241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -11,12 +11,12 @@ import io.grpc.ManagedChannelBuilder;
/**
* Simple example, to run:
* mvn clean install
* dapr run --grpc-port 3000 -- mvn exec:java -pl=examples -Dexec.mainClass=io.dapr.examples.Example
* dapr run --grpc-port 50001 -- mvn exec:java -pl=examples -Dexec.mainClass=io.dapr.examples.Example
*/
public class Example {
public static void main(String[] args) {
ManagedChannel channel =
ManagedChannelBuilder.forAddress("localhost", 3000).usePlaintext().build();
ManagedChannelBuilder.forAddress("localhost", 50001).usePlaintext().build();
DaprBlockingStub client = DaprGrpc.newBlockingStub(channel);
Any data = Any.newBuilder().setValue(ByteString.copyFromUtf8("foo")).build();
@ -40,4 +40,4 @@ public class Example {
client.deleteState(DeleteStateEnvelope.newBuilder().setKey(key).build());
System.out.println("Deleted!");
}
}
}