你可以从 GitHub releases 页面下载对应版本的 protoc-gen-grpc-java。选择适合你操作系统的版本,例如对于 Windows 用户,你可以下载 protoc-gen-grpc-java-<version>-windows-x86_64.exe。安装protoc-gen-grpc-java: 对于Windows 用户,将下载的 .exe 文件放置到一个合适的目录,例如 C:\protoc-gen-grpc-...
/Users/ghj1976/project/github/grpc/grpc-java/compiler/src/java_plugin/cpp/java_generator.h:8:10: fatal error: 'google/protobuf/io/zero_copy_stream.h' file not found #include <google/protobuf/io/zero_copy_stream.h> ^ 1 error generated. In file included from /Users/ghj1976/project/githu...
In file included from /Users/ghj1976/project/github/grpc/grpc-java/compiler/src/java_plugin/cpp/java_generator.cpp:1: /Users/ghj1976/project/github/grpc/grpc-java/compiler/src/java_plugin/cpp/java_generator.h:8:10: fatal error: 'google/protobuf/io/zero_copy_stream.h' file not found #in...
/Users/ghj1976/project/github/grpc/grpc-java/compiler/src/java_plugin/cpp/java_generator.h:8:10: fatal error: 'google/protobuf/io/zero_copy_stream.h' file not found #include <google/protobuf/io/zero_copy_stream.h> ^ 1 error generated. In file included from /Users/ghj1976/project/githu...
protoc--plugin=protoc-gen-grpc-java=/path/to/protoc-gen-grpc-java --grpc-java_out=.--java_out=. example.proto 1. 通过运行上面的命令,您将生成包含客户端和服务器端 Java 代码的文件。您可以在您的项目中引入这些生成的 Java 代码,以便实现 gRPC 服务。
protoc的protoc-gen-grpc-java插件 protoc的protoc-gen-grpc-java插件 编译的步骤:Change to the compiler directory:$ cd $GRPC_JAVA_ROOT/compiler To compile the plugin:$ ../gradlew java_pluginExecutable To test the plugin with the compiler:$ ../gradlew java_pluginExecutable 编译过程中如果出现下⾯...
下载exe文件后,放入protoc.exe 同级目录下。执行命令 >protoc -I=E:\grpc\protoc\bin --java_out=E:\grpc\protoc\bin E:\grpc\protoc\bin\helloworld.proto > protoc -I=E:\grpc\protoc\bin --plugin=protoc-gen-grpc-java=protoc-gen-grpc-java-1.46.0-windows-x86_32.exe --grpc-java_out=E:\grp...
➜/Users/lintong/coding/java/grpc-java/compiler/build/exe/java_plugingit:(ae49d275b) $ls protoc-gen-grpc-java 这时候就可以使用protoc命令到编译proto文件得到service代码,否则只能得到model代码 官方文档: 1 https://github.com/grpc/grpc-java/tree/master/compiler ...
<configuration> <protocArtifact> com.google.protobuf:protoc:3.1.0:exe:${os.detected.classifier} </protocArtifact> <pluginId>grpc-java</pluginId> <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.0:exe:${os.detected.classifier}</pluginArtifact> </configuration> 👍 8 🎉 2 coolbeevip men...
buildtools cmd internal testdata .gitattributes .gitignore .goreleaser.yaml LICENSE README.md go.mod go.sum go.work protoc_gen_grpc_java_test.goBreadcrumbs go-protoc-gen-grpc-java /.github /workflows / ci.yaml View Runs Latest commit