【dubbo源码分析】spring schema拓展

Published on with 16 views

1.基于xml schema

http://www.w3school.com.cn/schema/index.asp

dubbo的xsd在dubbo-config工程的META-INF目录下,文件名是dubbo.xsd

2.完成解析

用NamespaceHandler的子类解析命名空间元素,用BeanDefinitionParser解析映射,dubbo的解析类分别是DubboNamespaceHandler和DubboBeanDefinitionParser

3.注册schema和handler

用spring.handlers和spring.schemas完成对shemas和handler的注册


http\://dubbo.apache.org/schema/dubbo=org.apache.dubbo.config.spring.schema.DubboNamespaceHandler

http\://code.alibabatech.com/schema/dubbo=org.apache.dubbo.config.spring.schema.DubboNamespaceHandler


http\://dubbo.apache.org/schema/dubbo/dubbo.xsd=META-INF/dubbo.xsd

http\://code.alibabatech.com/schema/dubbo/dubbo.xsd=META-INF/compat/dubbo.xsd


标题:【dubbo源码分析】spring schema拓展
作者:MarsChan
地址:https://www.marscheng.cn/articles/2019/07/21/1563695907430.html

Responses