Skip to content

Commit

Permalink
Optimize DatabaseExportMetaDataGenerator, null value properties are n…
Browse files Browse the repository at this point in the history
…ot exported
  • Loading branch information
jiangML committed Dec 26, 2024
1 parent ad02d16 commit 9be8522
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@ private void appendDataSourceConfigurations(final ShardingSphereDatabase databas
private void appendDataSourceConfiguration(final String dataSourceName, final DataSourcePoolProperties props, final StringBuilder stringBuilder) {
stringBuilder.append(createIndentation(2)).append(dataSourceName).append(':').append(System.lineSeparator());
for (Entry<String, Object> entry : props.getConnectionPropertySynonyms().getStandardProperties().entrySet()) {
String value = null == entry.getValue() ? "" : entry.getValue().toString();
stringBuilder.append(createIndentation(4)).append(entry.getKey()).append(": ").append(value).append(System.lineSeparator());
if (null != entry.getValue()) {
String value = entry.getValue().toString();
stringBuilder.append(createIndentation(4)).append(entry.getKey()).append(": ").append(value).append(System.lineSeparator());
}
}
for (Entry<String, Object> entry : props.getPoolPropertySynonyms().getStandardProperties().entrySet()) {
String value = null == entry.getValue() ? "" : entry.getValue().toString();
stringBuilder.append(createIndentation(4)).append(entry.getKey()).append(": ").append(value).append(System.lineSeparator());
if (null != entry.getValue()) {
String value = entry.getValue().toString();
stringBuilder.append(createIndentation(4)).append(entry.getKey()).append(": ").append(value).append(System.lineSeparator());
}
}
}

Expand Down

0 comments on commit 9be8522

Please sign in to comment.