按照文档如何设置 gRPC 网关 https://github.com/grpc-ecosystem/grpc-gateway,我发现自己陷入了生成 grpc 网关的第四步。
也就是说,当添加以下行时,事情就会崩溃:
import "google/api/annotations.proto";
文档说You will need to provide the required third party protobuf files to the protoc compiler
- 但实际上并不是如何做到这一点。
我该如何添加google/api/annotations.proto
作为依赖?
我通过添加一种方式解决了这个问题第三方谷歌 API https://fuchsia.googlesource.com/third_party/googleapis/及其内容到我的项目的根目录。
感觉不对,但显然是这样受到鼓励 https://github.com/grpc-ecosystem/grpc-gateway/issues/1065#issuecomment-544241612
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)