fix issue-2948:spring boot external config invalid (#2950)
authorMei Ping <meiping05@gmail.com>
Thu, 13 Dec 2018 08:49:06 +0000 (16:49 +0800)
committerIan Luo <ian.luo@gmail.com>
Thu, 13 Dec 2018 08:49:06 +0000 (16:49 +0800)
dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/PropertySourcesUtils.java

index b613787..28d43fc 100644 (file)
@@ -55,7 +55,7 @@ public abstract class PropertySourcesUtils {
                     if (name.startsWith(normalizedPrefix)) {
                         String subName = name.substring(normalizedPrefix.length());
                         String value = propertyResolver.getProperty(name);
-                        subProperties.put(subName, value);
+                        subProperties.putIfAbsent(subName, value);
                     }
                 }
             }