安装protoc和grpc插件
1. 下载:
https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/1.34.1/
https://repo1.maven.org/maven2/com/google/protobuf/protoc/3.14.0/
2. 配置环境变量 。或创建软连接
ln -s /Users/luan/apps/protoc-3.14.0-osx-x86_64.exe /usr/local/bin/protoc3
3. 使用
rm -rf /Users/luan/im-commons/src/main/java/keaikai/im/common/proto
protoc3 --plugin=protoc-gen-grpc-java=/Users/luan/apps/protoc-gen-grpc-java-1.34.1-osx-x86_64.exe --java_out=./src/main/java --grpc-java_out=./src/main/java --proto_path ./src/main/java kim-proto.proto grpc-test.proto
https://my.oschina.net/Rayn/blog/751316