如何在gRPC中为Java手动生成客户端和服务器代码?
official documentation说明了有关生成客户机和服务器代码的以下内容
Next we need to generate the gRPC client and server interfaces from our .proto service definition. We do this using the protocol buffer compiler protoc with a special gRPC Java plugin. You need to use the proto3 compiler (which supports both proto2 and proto3 syntax) in order to generate gRPC services.
不幸的是,它只是建议使用Maven或Gradle来生成实际的客户机和服务器存根
这一代的实际protoc
命令行调用是什么
# 1 楼答案
{a1}自述文件谈到了这一点: