一、概述
spring容器启动dubbo provider服务时,会根据spring.xml的文件配置实例化spring context以及初始化bean,DubboNamespaceHandler注册DubboBeanDefinitionParser解析xml,实例化有关dubbo的相关bean。当初始化服务提供者ServiceBean时,调用afterPropertiesSet方法时,会打开注册器registry连接,export服务提供者信息。
二、provider service容器启动
1.provider.xml的解析
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://dubbo.apache.org/schema/d