This commit is contained in:
eson 2022-06-21 18:09:54 +08:00
parent fe396afe76
commit 15e84f54af
3 changed files with 5 additions and 6 deletions

View File

@ -27,7 +27,7 @@
<nacos.version>2.1.0</nacos.version>
<snakeyaml.version>1.30</snakeyaml.version>
<yuandian.common.config.version>1.0.0-SNAPSHOT</yuandian.common.config.version>
<yuandian.common.config.version>1.0.2</yuandian.common.config.version>
</properties>
<dependencies>

View File

@ -115,8 +115,8 @@ public class CollectPackets extends CollectPacketsServerImplBase {
// private final ManagedChannelBuilder<?> managedChannelBuilder;
// private final CollectPacketsServerStub blockingStub;
// private final ManagedChannelBuilder<?> managedChannelBuilder;
// private final CollectPacketsServerStub blockingStub;
// private final ManagedChannel channel;
// public Client(String name, int port) {
@ -130,7 +130,7 @@ public class CollectPackets extends CollectPacketsServerImplBase {
// MyThing.Response response = blockingStub.sayHi(request);
// System.out.println(response.getName());
// }
var managedChannelBuilder = ManagedChannelBuilder.forAddress("localhost", 50051);
var managedChannelBuilder = ManagedChannelBuilder.forAddress("10.1.1.117", 50051);
var channel = managedChannelBuilder.usePlaintext().build();
var stub = CollectPacketsServerGrpc.newBlockingStub(channel);
// stub.withCompression("snappy");
@ -151,6 +151,5 @@ public class CollectPackets extends CollectPacketsServerImplBase {
log.info("条数:{}, {}:ms",i,Duration.between(now, Instant.now()).toMillis());
}
}
}

View File

@ -3,7 +3,7 @@
class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
%d{yyyyMMdd HH:mm:ss.SSS} %-5level[%thread\(%file:%line\)]: %msg%n
%d{yyyyMMdd HH:mm:ss.SSS} %-5level%thread(%file:%line): %msg%n
</pattern>
</encoder>
</appender>