最近在研究gRpc,在开发过程中遇到一个问题,做下记录。
Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.1:compile (default-cli) on project demo: protoc did not exit cleanly. Review output for more information.
做了一些排查,最后发现是因为.proto文件写的有问题
两个红框处的内容不能一样,否则就会报上述错误。
修改成不同编译通过。
syntax = "proto3";
option java_multiple_files = true;
option java_package = "com.demo";
option java_outer_classname = "AiServiceR";
service AiService {
rpc SendLogMessage(LogMessage) returns (ResultResponse) ;
}
message ResultResponse {
int32 result = 1;
}
message LogMessage {
string proc_name = 1;
int32 log_level = 2;
string message = 3;
}
更多推荐
protoc did not exit cleanly. Review output for more information报错
发布评论