dubbo
dubbo copied to clipboard
[Discussion] @Reference和@Service Naming issues
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等
支持这种改法,注解 @Service 在使用过程中确实容易搞错,可以增加新的注解 @DubboService,不会产生歧义,@Service 仅作为老版本兼容使用
+1
+1
+1