关于#Dubbo#的问题,如何解决?

我的实现类加上@Service就是没问题的
换成@DubboService就扫描不到实现类了
@DubboService是Springboot自带的注解吗 为什么会扫描不到呢

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.xybao.policy.BranchManagementTest': Unsatisfied dependency expressed through field 'iBranchManagementQueryService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.xybao.settlement.IBranchManagementQueryService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

不是,@DubboService是dubbo的注解,你需要在application.properties或者yml文件配置一下内容:

dubbo.scan.base-packages=dubbo实现类的包名

# Dubbo Application
## The default value of dubbo.application.name is ${spring.application.name}
dubbo.application.name=${spring.application.name}
dubbo.application.id=${spring.application.name}
# Dubbo Protocol
dubbo.protocol.name=dubbo
dubbo.protocol.port=-1

## Dubbo Registry
#dubbo.registry.address=N/A
dubbo.registry.address=注册地址
dubbo.provider.timeout=10000

dubbo 得单独配 dubbo的包扫描路径

自动装配那里用@DubboReference,不是Autowired

这篇文章:使用dubbo服务中踩过的坑。。。。。 也许能够解决你的问题,你可以看下