当前位置: 代码迷 >> 综合 >> io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found:
  详细解决方案

io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found:

热度:19   发布时间:2023-12-23 06:11:50.0

io.grpc.StatusRuntimeException: UNIMPLEMENTED: Method not found:xxxx.xxx.xxx

当grpc客服端连接服务端出现

只需要要把自动生成的:

客服端****Grpc.java文件中 SERVICE_NAME 路径改成

服务端那边自动生成的****Grpc.java文件中 SERVICE_NAME同样文件的路径就行

@javax.annotation.Generated(value = "by gRPC proto compiler (version 1.26.0)",comments = "Source: Tiger.proto")
public final class UserServiceGrpc {private UserServiceGrpc() {}public static final String SERVICE_NAME = "com.zz.grpcserver.grpc.server.config.UserService";

 
 

protoc-3.5.1-windows-x86_64.exe ./Tiger.proto --java_out=G:\git\spring\grpc-server\src\main\java

protoc-3.5.1-windows-x86_64.exe --plugin=protoc-gen-grpc-java=./protoc-gen-grpc-java-1.26.0-windows-x86_64.exe --grpc-java_out=G:\git\spring\grpc-server\src\main\java --proto_path=./ ./Tiger.proto

  相关解决方案