美文网首页
二、暴漏服务(Dubbo Protocol)

二、暴漏服务(Dubbo Protocol)

作者: 恶魔幻心 | 来源:发表于2018-08-03 16:16 被阅读0次

1、配置spring.handlers 

org.apache.dubbo.config.spring.schema.DubboNamespaceHandler

这样解析xml时,把解析为特定的BeanDefinitions,以便后面doCreateBean

暴漏服务(Dubbo Protocol):

1、解析bean为ServiceBean

2、doCreateBean 时 populateBean ,把 ServiceBean.ref更新为实际对象(DemoServiceImpl等)

3、ServiceBean 实现了 InitializingBean,调用初始化方法 afterPropertiesSet,初始化ServiceBean属性,根据是否延迟来调用 export 暴漏服务

4、实现ApplicationListener ,finishRefresh 时调用 export

5、export to local if the config is not remote

6、调用netty暴漏服务

        调用链

7、注册 provider到zk


相关文章

网友评论

      本文标题:二、暴漏服务(Dubbo Protocol)

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