apache/dubbo

I'm curious about the method:getSubProperties

Open

#7.250 aberto em 23 de fev. de 2021

Ver no GitHub
 (1 comment) (0 reactions) (0 assignees)Java (26.453 forks)batch import
help wanted

Métricas do repositório

Stars
 (41.524 stars)
Métricas de merge de PR
 (Mesclagem média 7d 14h) (20 fundiu PRs em 30d)

Description

Environment

  • Dubbo version: 2.7.5-SNAPSHOT
  • Operating System version: win10
  • Java version: 1.8.0_111

Steps to reproduce this issue

  1. 为什么解析@EnableDubboConfigBinding的每一行配置都要从springEnv引用到 new AbstractEnvironment() 见org/apache/dubbo/config/spring/util/PropertySourcesUtils.java:52 如下: public static Map<String, Object> getSubProperties(Iterable<PropertySource<?>> propertySources, String prefix) {

     // Non-Extension AbstractEnvironment
     AbstractEnvironment environment = new AbstractEnvironment() {
     };
    
     MutablePropertySources mutablePropertySources = environment.getPropertySources();
    
     for (PropertySource<?> source : propertySources) {
         mutablePropertySources.addLast(source);
     }
    

Guia do colaborador