可以使用Java来定义Protocol Buffers吗?
也就是说,它不是
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply) {}
}我想要一份
public interface Greeter {
@Grpc
HelloReply sayHello (HelloRequest req);
}
@GrpcMessage()
public class HelloReply{
@GrpcField(1)
string name;
} 这是我的POJO上类似Hibernate/JPA的注释,而不是成堆的生成代码。
我只能找到协议缓冲区动态架构https://github.com/os72/protobuf-dynamic
发布于 2016-11-09 01:04:18
看一看protostuff:https://github.com/protostuff/protostuff它支持你想要的protobuf (虽然不是grpc,也许它可以增强)
https://stackoverflow.com/questions/40425211
复制相似问题