dubbo
dubbo copied to clipboard
Multi-services gen error with dubbo-compiler
主要目的是想实现,dubbo 可以直接调服务,也可以直接调网关(号段路由)。dubbo reference 无法实现,所以想用两个接口区分。
@EarthChen @guohao @icodening PTAL
暂时建议把 service 放在不同的 proto 文件中,后续版本会进行支持
使用
和proto文件
syntax = "proto3";
option java_multiple_files = true; option java_package = "com.example.dubbomutiservice.proto"; option java_outer_classname = "UserServiceProto"; option objc_class_prefix = "DEMOSRV";
package userservice;
// The demo service definition. service UserService { rpc SayHello (HelloRequest) returns (HelloReply) {} }
service UserServiceGtw { rpc SayHello (HelloRequest) returns (HelloReply) {} }
// The request message containing the user's name. message HelloRequest { string name = 1; }
// The response message containing the greetings message HelloReply { string message = 1; } 没有复现编译error,请贴一下使用的plugin和Proto文件
不要这行就会报哈 option java_outer_classname = "UserServiceProto";