diff --git a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingDataSourceMapperRuleAttribute.java b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingDataSourceMapperRuleAttribute.java index c71d74c8e2693..d421c164b6301 100644 --- a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingDataSourceMapperRuleAttribute.java +++ b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/attribute/ReadwriteSplittingDataSourceMapperRuleAttribute.java @@ -23,7 +23,7 @@ import org.apache.shardingsphere.readwritesplitting.rule.ReadwriteSplittingDataSourceGroupRule; import java.util.Collection; -import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; /** @@ -37,7 +37,7 @@ public final class ReadwriteSplittingDataSourceMapperRuleAttribute implements Da @HighFrequencyInvocation @Override public Map> getDataSourceMapper() { - Map> result = new HashMap<>(dataSourceGroupRules.size(), 1F); + Map> result = new LinkedHashMap<>(dataSourceGroupRules.size(), 1F); for (ReadwriteSplittingDataSourceGroupRule each : dataSourceGroupRules) { result.put(each.getName(), each.getReadwriteSplittingGroup().getAllDataSources()); }