dubbo 直连

第一种:

<dubbo:reference interface="com.xxx.XxxService" id="xxxService" url="dubbo://192.168.1.12:12006/xxxOrder"/>
这种适合开发联调是方式

测试的时候不能硬编码的,可以采用如下的配置文件

在VM options 中加入下面配置文件
-Ddubbo.properties.file=/C:\Users\admin\Desktop\dubbo.properties

dubbo.properties 内容如下 此文件的xxxService 对应 上面id

dubbo.reference.xxxService.url=dubbo://192.168.1.12:12006/xxxOrder




posted @ 2017-08-10 10:04  蝼蚁尚不自知  阅读(224)  评论(0编辑  收藏  举报