shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/ResourceSegmentsConverter.java
/**
     * Convert resource segments to data source configuration map.
     *
     * @param databaseType database type
     * @param resources data source segments
     * @return data source configuration map
     */
Convert resource segments to data source configuration map.
@param databaseType database type
@param resources data source segments
@return data source configuration map
Convert resource segments to data source configuration map . @param databaseType database type @param resources data source segments @return data source configuration map
public static Map<String, DataSourceConfiguration> convert(final DatabaseType databaseType, final Collection<DataSourceSegment> resources) {
        Map<String, DataSourceConfiguration> result = new LinkedHashMap<>(resources.size(), 1);
        for (DataSourceSegment each : resources) {
            DataSourceParameter dataSource = new DataSourceParameter();
            dataSource.setUrl(getURL(databaseType, each));
            dataSource.setUsername(each.getUser());
            dataSource.setPassword(each.getPassword());
            dataSource.setCustomPoolProps(each.getProperties());
            result.put(each.getName(), createDataSourceConfiguration(databaseType, each));
        }
        return result;
    }
public static Map < String , DataSourceConfiguration > convert ( final DatabaseType databaseType , final Collection < DataSourceSegment > resources ) { Map < String , DataSourceConfiguration > result = new LinkedHashMap < > ( resources . size ( ) , 1 ) ; for ( DataSourceSegment each : resources ) { DataSourceParameter dataSource = new DataSourceParameter ( ) ; dataSource . setUrl ( getURL ( databaseType , each ) ) ; dataSource . setUsername ( each . getUser ( ) ) ; dataSource . setPassword ( each . getPassword ( ) ) ; dataSource . setCustomPoolProps ( each . getProperties ( ) ) ; result . put ( each . getName ( ) , createDataSourceConfiguration ( databaseType , each ) ) ; } return result ; }
Convert resource segments to data source configuration map.
Convert resource segments to data source configuration map .