标签:pack multi option sage bin exe ESS package contain
一、下载protoc.exeoption java_multiple_files = true;
option java_package = "com.yuhang.protobuf";
option java_outer_classname = "HelloWorldProto";
option objc_class_prefix = "HLW";
package helloworld;
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
// The request message containing the user‘s name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings
message HelloReply {
string message = 1;
}
四、在cmd执行以下命令
1)D:\work2020\proto\protoc-3.13.0-win64\bin\protoc.exe --plugin=protoc-gen-grpc-java=D:\work2020\proto\protoc-gen-grpc-java-1.28.1-windows-x86_64.exe --grpc-java_out=. helloworld.proto
获得:GreeterGrpc
2)D:\work2020\proto\protoc-3.13.0-win64\bin\protoc.exe --java_out=. helloworld.proto
获得:
HelloReply
HelloReplyOrBuilder
HelloRequest
HelloRequestOrBuilder
HelloWorldProto
标签:pack multi option sage bin exe ESS package contain
原文地址:https://blog.51cto.com/332532/2542707