1.以此種接口依賴的方式
這種相當於將其他模塊的服務先拿過來dubbo自己在本模塊中進行注入,此時可以直接用Spring的@Autowired注解引用 ,這種情況下本模塊的掃描dubbo是所引用的模塊
<dubbo:reference interface="com.xian62.system.api.service.ITripUserService" id="tripUserService" />
<dubbo:reference interface="com.xian62.system.api.service.ICaptchaService" id="captchaService" />
<dubbo:reference interface="com.xian62.system.api.service.ICurrencyRateService" id="currencyRateService" />
-
以掃描包的形式
<dubbo:annotation package="com.xian62.web.api"/>
此種方式是相當於將其他模塊的服務拿過來,此時想要引入某個模塊的話 需要使用dubbo的@Reference注解,這種情況下掃描的是本模塊的包