dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

[Discussion] @Reference和@Service Naming issues

Open mercyblitz opened this issue 6 years ago • 4 comments

The source: https://github.com/apache/dubbo-spring-boot-project/issues/447 The reporter: @linux-china

-- Original Content --

看readme中的demo

@Service(version = "1.0.0")
public class DefaultDemoService implements DemoService {

这个@Service 和Spring中的@Repository和@Service太容易混淆啦。 个人是建议调整为 @DubboService 和 @DubboReference

org.apache.dubbo.config.annotation.Service
org.apache.dubbo.config.annotation.Reference

Spring Boot和其他的RPC框架整合的Demo中,如grpc为 @GRpcService, RSocket RPC为 @RSocketService等

mercyblitz avatar Apr 13 '20 08:04 mercyblitz

支持这种改法,注解 @Service 在使用过程中确实容易搞错,可以增加新的注解 @DubboService,不会产生歧义,@Service 仅作为老版本兼容使用

laddcn avatar Apr 13 '20 12:04 laddcn

+1

rj-chensiqu avatar Apr 17 '20 02:04 rj-chensiqu

+1

mostcool avatar Apr 17 '20 05:04 mostcool

+1

vergilyn avatar Apr 17 '20 08:04 vergilyn