zoukankan      html  css  js  c++  java
  • dubbo 学习

    dubbo 有两个重要的配置文件

    dubbo-provider.xml文件

    dubbo-xxx-consumer.xml文件

    dubbo-provider.xml 文件结果如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" 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-3.1.xsd
        http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
    
        <!-- 提供者服务 -->
        <dubbo:service interface="com.companyName.sysName.facade.packageName.XXXFacade" ref="XXXFacade" provider="default-provider"
            mock="false" version ="4.0.0"/>
    </beans>

    dubbo-xxx-consumer.xml 文件结构如下:

    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans" 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-3.1.xsd
        http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
    
        <!-- xxx服务注册中心地址 -->
        <dubbo:registry  id="xxxRegistryCenter"
                        protocol="${xxx.web.dubbo.registry.protocol}" 
                        address="${internal.msg.registry.address}"
                        transporter="${xxx.web.dubbo.registry.transporter}"
                        timeout="${xxx.web.dubbo.consumer.timeout}"/> 
                        
        <dubbo:reference interface="com.companyName.sysName.facade.xxxFacade" id="xxxFacade" registry="xxxRegistryCenter" version="4.0.0" check="false" />
        
    </beans>
  • 相关阅读:
    Python匹马行天下之_循环
    Hello world!
    Python匹马天下行之python基本语法
    Python匹马行天下之python之父
    Python匹马行天下之面向对象
    Python匹马行天下之运算符
    Python匹马行天下之初识python!
    跨域问题学习记录 CORS解决的2种方法
    Linux系统运维成长记
    关于倒计时new Date().getTime()出现NaN
  • 原文地址:https://www.cnblogs.com/mengjianzhou/p/7727563.html
Copyright © 2011-2022 走看看