<> 旧版配置文件解析

实例代码

引入dubbo 依赖




  org.apache.zookeeper
  zookeeper
  3.4.9


  com.101tec
  zkclient
  0.10



  com.alibaba
  dubbo
  2.5.3
  
    
      org.springframework
      spring
    
  

服务

@Slf4j
public class DemoServiceImpl implements DemoService {
    @Override
    public String sayHello(String name) {
        log.info("[sayHello]start: {}", name);
        return "Hello " + name + " " + new Date();
    }
}

xml 配置


    
    
    
    
    
    
    
    
    
    

启动类

@SpringBootApplication
@ImportResource(value = "classpath*:META-INF/provider.xml")
public class DubboProviderApplication {

    public static void main(String[] args) {
        SpringApplication.run(DubboProviderApplication.class, args);
    }

}

流程梳理

解析配置文件到 beanDefinitionMap

image.png

你可能感兴趣的:(<> 旧版配置文件解析)