in shardingsphere-ui-backend/src/main/java/org/apache/shardingsphere/ui/servcie/impl/ShardingSchemaServiceImpl.java [118:130]
private void checkDataSourceConfiguration(final String configData) {
try {
Map<String, Map<String, Object>> yamlDataSources = YamlEngine.unmarshal(configData, Map.class);
Map<String, DataSourceConfiguration> dataSourceConfigs = yamlDataSources.isEmpty() ? new HashMap<>()
: yamlDataSources.entrySet().stream().collect(Collectors.toMap(
Map.Entry::getKey, entry -> new YamlDataSourceConfigurationSwapper().swapToDataSourceConfiguration(entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new));
Preconditions.checkState(!dataSourceConfigs.isEmpty());
// CHECKSTYLE:OFF
} catch (final Exception ex) {
// CHECKSTYLE:ON
throw new IllegalArgumentException("data source configuration is invalid.", ex);
}
}