1.以此种接口依赖的方式

这种相当于将其他模块的服务先拿过来dubbo自己在本模块中进行注入,此时可以直接用Spring的@Autowired注解引用 ,这种情况下本模块的扫描dubbo是所引用的模块

<dubbo:reference interface="com.xian62.system.api.service.ITripUserService" />
<dubbo:reference interface="com.xian62.system.api.service.ICaptchaService" />
<dubbo:reference interface="com.xian62.system.api.service.ICurrencyRateService" />

  1. 以扫描包的形式

    <dubbo:annotation package="com.xian62.web.api"/>

    此种方式是相当于将其他模块的服务拿过来,此时想要引入某个模块的话 需要使用dubbo的@Reference注解,这种情况下扫描的是本模块的包

相关文章:

  • 2021-08-21
  • 2021-09-10
  • 2022-01-01
  • 2022-12-23
  • 2021-12-26
  • 2021-11-29
  • 2021-12-25
  • 2022-12-23
猜你喜欢
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-24
  • 2021-06-08
  • 2021-08-04
相关资源
相似解决方案