Open saichandu415 opened 2 years ago
You can Dubbo ServiceConfig API or <dubbo:service>
definition to define multiple service. Dubbo only support a service with one interface. You should register each interface to Dubbo even those target implementation are the same.
Thanks @AlbumenJ Is it possible for you to provide some reference for the same? I am unaware of this approach.
ServiceConfig
ServiceConfig
ServiceConfig< ModifyUser > serviceConfig3 = new ServiceConfig<>(); serviceConfig3setInterface(ModifyUser.class); serviceConfig3.setTarget(xxx); serviceConfig3.export();
I used 2.7.12 & 2.7.14 & 3.0.4 versions of Dubbo for maven multi module project, the problem is while the serviceImpl(UserService) is implementing 3 interfaces, only the one in the first gets registered with the service discovery (Nacos)
If I change the FetchUser interface next to implements keyword (
UserService implements FetchUser
) then fetchuser gets registered.Am I missing something here? Or is it something a limitation to apache dubbo? Any help is appreciated. Thanks
My Service class implements multiple interfaces like below
Base Application class as below
and below is the dubbo configuration