美文网首页
dubbox---provider.xml配置文件说明

dubbox---provider.xml配置文件说明

作者: brightranger | 来源:发表于2017-02-21 23:04 被阅读277次

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.xsd    
             http://code.alibabatech.com/schema/dubbo        
             http://code.alibabatech.com/schema/dubbo/dubbo.xsd">

    <!-- 提供方应用信息,用于计算依赖关系 -->
    <dubbo:application name="hello-world-app" />
    <!-- 使用multicast广播注册中心暴露服务地址 -->
    <dubbo:registry address="multicast://224.5.6.7:1234" />
    <!-- 用dubbo协议在20880端口暴露服务 -->
    <dubbo:protocol name="dubbo" port="20880"/>
    <!-- 声明需要暴露的服务接口 -->
    <dubbo:service interface="com.alibaba.dubbo.demo.DemoService" ref="demoService"/>
    <!-- 和本地bean一样实现服务 -->
   <bean id="demoService" class="com.alibaba.dubbo.demo.provider.DemoServiceImpl"/>

</beans>
<dubbo:application>配置选项:

标签|属性|对应URL参数|类型|是否必填|缺省值|作用|描述
-|-:
<dubbo:application>|name|application|string|必填||服务治理|当前应用名称,用于注册中心计算应用间依赖关系,注意:消费者和提供者应用名不要一样,此参数不是匹配条件,你当前项目叫什么名字就填什么,和提供者消费者角色无关,比如:kylin应用调用了morgan应用的服务,则kylin项目配成kylin,morgan项目配成morgan,可能kylin也提供其它服务给别人使用,但kylin项目永远配成kylin,这样注册中心将显示kylin依赖于morgan
<dubbo:application>|version|application.version|string|可选||服务治理|当前应用的版本
<dubbo:application>|owner|owner|string|可选||服务治理|应用负责人,用于服务治理,请填写负责人公司邮箱前缀

<div class="row">
<div class="span4">
<table>
<tr>
</tr>
</table>
</div>
</div>

<div>
<table border="1">
<tr>
  <td>sdfsdfsdf</td>
</tr>
</table>
</div>```

相关文章

网友评论

      本文标题:dubbox---provider.xml配置文件说明

      本文链接:https://www.haomeiwen.com/subject/gehpwttx.html