mirror of https://github.com/dapr/java-sdk.git
Fixing port on Example.java
This commit is contained in:
parent
b10a6fd039
commit
f89a53e241
|
@ -11,12 +11,12 @@ import io.grpc.ManagedChannelBuilder;
|
||||||
/**
|
/**
|
||||||
* Simple example, to run:
|
* Simple example, to run:
|
||||||
* mvn clean install
|
* 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 class Example {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
ManagedChannel channel =
|
ManagedChannel channel =
|
||||||
ManagedChannelBuilder.forAddress("localhost", 3000).usePlaintext().build();
|
ManagedChannelBuilder.forAddress("localhost", 50001).usePlaintext().build();
|
||||||
DaprBlockingStub client = DaprGrpc.newBlockingStub(channel);
|
DaprBlockingStub client = DaprGrpc.newBlockingStub(channel);
|
||||||
|
|
||||||
Any data = Any.newBuilder().setValue(ByteString.copyFromUtf8("foo")).build();
|
Any data = Any.newBuilder().setValue(ByteString.copyFromUtf8("foo")).build();
|
||||||
|
|
Loading…
Reference in New Issue