dubbo(provider,consumer)点到点直连配置

1.服务端接口配置(providr样例)applicationContext-dubbo-smk.xml:


    xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
    xmlns="http://www.springframework.org/schema/beans"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://code.alibabatech.com/schema/dubbo
 http://code.alibabatech.com/schema/dubbo/dubbo.xsd" >

   
    

2.服务端注册配置:


 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://code.alibabatech.com/schema/dubbo
 http://code.alibabatech.com/schema/dubbo/dubbo.xsd">      
 
 
 
   
   
  
 
 
 
 

3.dubbo客户端配置(consumer)


    xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
    xmlns="http://www.springframework.org/schema/beans"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans.xsd
 http://code.alibabatech.com/schema/dubbo
 http://code.alibabatech.com/schema/dubbo/dubbo.xsd" >

   

   
   
   
   
  
   
   

   
   

          id="demoService"
        interface="com.hoperun.biz.demoservice.service.DemoService"
        url="dubbo://127.0.0.1:20880/com.hoperun.biz.demoservice.service.DemoService"
        version="1.0" />
 
          id="smkService"
        interface="com.hoperun.biz.smk.service.SmkService"
        url="dubbo://10.254.201.123:20880/com.hoperun.biz.smk.service.SmkService"
        version="1.0" />  

 

你可能感兴趣的:(dubbo)