Make sure that the type used for discovery implements DataSource

See gh-23480
pull/23616/head
Stephane Nicoll 4 years ago
parent 0106539ecb
commit ef2fee22cb

@ -194,8 +194,8 @@ public final class DataSourceBuilder<T extends DataSource> {
create(classLoader, "org.springframework.jdbc.datasource.SimpleDriverDataSource", create(classLoader, "org.springframework.jdbc.datasource.SimpleDriverDataSource",
(type) -> new DataSourceSettings(type, (type) -> new DataSourceSettings(type,
(aliases) -> aliases.addAliases("driver-class-name", "driver-class")))); (aliases) -> aliases.addAliases("driver-class-name", "driver-class"))));
addIfAvailable(this.allDataSourceSettings, create(classLoader, addIfAvailable(this.allDataSourceSettings, create(classLoader, "oracle.jdbc.datasource.OracleDataSource",
"oracle.jdbc.datasource.OracleCommonDataSource", OracleCommonDataSourceSettings::new)); OracleCommonDataSourceSettings::new));
} }
private static List<DataSourceSettings> resolveAvailableDataSourceSettings(ClassLoader classLoader) { private static List<DataSourceSettings> resolveAvailableDataSourceSettings(ClassLoader classLoader) {

Loading…
Cancel
Save