dubbo源码之一——xml schema扩展
dubbo源码版本:2.5.4
dubbo-parent
|----dubbo-config
|----dubbo-config-api
|----com.alibaba.dubbo.config.*
|----dubbo-config-spring
|----com.alibaba.dubbo.config.spring.schema.DubboNamespaceHandler.java
|----com.alibaba.dubbo.config.spring.schema.DubboBeanDefinitionParser.java
|----META-INF/dubbo.xsd
|----META-INF/spring.handlers
|----META-INF/spring.schemas
注:*代表任意文件或目录。
阿里巴巴的工程师利用spring schema扩展为dubbo定义了
XML Schema:http://code.alibabatech.com/schema/dubbo/dubbo.xsd
XML namespace:http://code.alibabatech.com/schema/dubbo
----------------------------------------------------------------------------------------------------------------------------------
dubbo schema定义了如下对象:
ApplicationConfig
ModuleConfig
RegistryConfig
MonitorConfig
ProviderConfig
ConsumerConfig
ProtocolConfig
ServiceBean
ReferenceBean
AnnotationBean
在spring xml文件中按照下面的方式注入dubbo schema中定义的对象:
----------------------------------------------------------------------------------------------------------------------------------
<?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://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
<dubbo:application name="annotation-consumer" />
<dubbo:registry address="127.0.0.1:4548" />
<dubbo:annotation package="com.alibaba.dubbo.config.spring.annotation.consumer" />
</beans>
dubbo源码之一——xml schema扩展的更多相关文章
- dubbo源码分析5-dubbo的扩展点机制
dubbo源码分析1-reference bean创建 dubbo源码分析2-reference bean发起服务方法调用 dubbo源码分析3-service bean的创建与发布 dubbo源码分 ...
- 缘起 Dubbo ,讲讲 Spring XML Schema 扩展机制
背景 在 Dubbo 中,可以使用 XML 配置相关信息,也可以用来引入服务或者导出服务.配置完成,启动工程,Spring 会读取配置文件,生成注入 相关 Bean.那 Dubbo 如何实现自定义 X ...
- dubbo源码阅读之自适应扩展
自适应扩展机制 刚开始看代码,其实并不能很好地理解dubbo的自适应扩展机制的作用,我们不妨先把代码的主要逻辑过一遍,梳理一下,在了解了代码细节之后,回过头再来思考自适应扩展的作用,dubbo为什么要 ...
- dubbo源码分析6-telnet方式的管理实现
dubbo源码分析1-reference bean创建 dubbo源码分析2-reference bean发起服务方法调用 dubbo源码分析3-service bean的创建与发布 dubbo源码分 ...
- dubbo源码分析1-reference bean创建
dubbo源码分析1-reference bean创建 dubbo源码分析2-reference bean发起服务方法调用 dubbo源码分析3-service bean的创建与发布 dubbo源码分 ...
- dubbo源码分析2-reference bean发起服务方法调用
dubbo源码分析1-reference bean创建 dubbo源码分析2-reference bean发起服务方法调用 dubbo源码分析3-service bean的创建与发布 dubbo源码分 ...
- dubbo源码分析3-service bean的创建与发布
dubbo源码分析1-reference bean创建 dubbo源码分析2-reference bean发起服务方法调用 dubbo源码分析3-service bean的创建与发布 dubbo源码分 ...
- dubbo源码分析4-基于netty的dubbo协议的server
dubbo源码分析1-reference bean创建 dubbo源码分析2-reference bean发起服务方法调用 dubbo源码分析3-service bean的创建与发布 dubbo源码分 ...
- Dubbo源码-Dubbo是如何随心所欲自定义XML标签的
叨叨 今天考虑了很久要不要写这篇文章. 距离<Dubbo源码>系列的开篇到现在已经快两个月时间了.当时是想着工作上的RPC框架使用存在一些让人头疼的问题,就来看看Dubbo给出了一套什么样 ...
随机推荐
- WPF中实现
计算类的封装 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespa ...
- 夺命雷公狗---微信开发62----所以memcache对access_token进行全局缓存优化
公众号调用接口并不是无限制的,为了防止公众号的程序错误而引发微信服务器负载异常,默认情况下, 每个公众号调用接口都不能超过一定限制,当超过一定限制时,调用对应接口会收到错误信息,造成调用失败. 我们也 ...
- clock
Prime Time中的clock分析包括: 1)Multiple clocks,clock from port/pin,virtual clock. 2)Clock network delay an ...
- zw版【转发·台湾nvp系列Delphi例程】HALCON SetGray
zw版[转发·台湾nvp系列Delphi例程]HALCON SetGray SetGray_Delphi.PNG unit Unit1;interfaceuses Windows, Messages, ...
- android之‘com.example.android.apis.view’的代码段
1.AutoCompleteTextView ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, and ...
- Elasticsearch--数据索引
前言 Elasticsearch可以支持全文检索,那么ES是以什么机制来支持的,这里索引就是一个重要的步骤,经过索引之后的文档才可以被分析存储.建立倒排索引.本篇就是以ES的数据检索操作来讨论的. 更 ...
- 【python cookbook】【数据结构与算法】14.对不原生支持比较操作的对象排序
问题:想在同一个类的实例之间做排序,但是它们并不原生支持比较操作. 解决方案:使用内建的sorted()函数可接受一个用来传递可调用对象的参数key,sorted利用该可调用对象返回的待排序对象中的某 ...
- 【secureCRT】中文乱码问题
Options->Session Options->Appearance->Font->新宋体 字符集:中文GB2312 ->Character encoding 为UT ...
- Java中常见数据结构:list与map
1:集合 Collection(单列集合) List(有序,可重复) ArrayList 底层数据结构是数组,查询快,增删慢 线程不安全,效率高 Vector 底层数据结构是数组,查询快,增删慢 线程 ...
- How To Set Up vsftpd on CentOS 6
About vsftpd 警告:FTP是天生不安全.如果你必须使用FTP,考虑securing your FTP connection with SSL/TLS.否则,最好use SFTP, a se ...