|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2012-2021 the original author or authors. |
|
|
|
* Copyright 2012-2022 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -398,8 +398,7 @@ public final class DataSourceBuilder<T extends DataSource> { |
|
|
|
Class<T> dataSourceType) { |
|
|
|
Class<T> dataSourceType) { |
|
|
|
MappedDataSourceProperties<T> result = null; |
|
|
|
MappedDataSourceProperties<T> result = null; |
|
|
|
result = lookup(classLoader, dataSourceType, result, |
|
|
|
result = lookup(classLoader, dataSourceType, result, |
|
|
|
"org.springframework.jdbc.datasource.SimpleDriverDataSource", |
|
|
|
"org.springframework.jdbc.datasource.SimpleDriverDataSource", SimpleDataSourceProperties::new); |
|
|
|
() -> new SimpleDataSourceProperties()); |
|
|
|
|
|
|
|
result = lookup(classLoader, dataSourceType, result, "oracle.jdbc.datasource.OracleDataSource", |
|
|
|
result = lookup(classLoader, dataSourceType, result, "oracle.jdbc.datasource.OracleDataSource", |
|
|
|
OracleDataSourceProperties::new); |
|
|
|
OracleDataSourceProperties::new); |
|
|
|
result = lookup(classLoader, dataSourceType, result, "org.h2.jdbcx.JdbcDataSource", |
|
|
|
result = lookup(classLoader, dataSourceType, result, "org.h2.jdbcx.JdbcDataSource", |
|
|
|
@ -660,7 +659,7 @@ public final class DataSourceBuilder<T extends DataSource> { |
|
|
|
SimpleDataSourceProperties() { |
|
|
|
SimpleDataSourceProperties() { |
|
|
|
add(DataSourceProperty.URL, SimpleDriverDataSource::getUrl, SimpleDriverDataSource::setUrl); |
|
|
|
add(DataSourceProperty.URL, SimpleDriverDataSource::getUrl, SimpleDriverDataSource::setUrl); |
|
|
|
add(DataSourceProperty.DRIVER_CLASS_NAME, Class.class, (dataSource) -> dataSource.getDriver().getClass(), |
|
|
|
add(DataSourceProperty.DRIVER_CLASS_NAME, Class.class, (dataSource) -> dataSource.getDriver().getClass(), |
|
|
|
(dataSource, driverClass) -> dataSource.setDriverClass(driverClass)); |
|
|
|
SimpleDriverDataSource::setDriverClass); |
|
|
|
add(DataSourceProperty.USERNAME, SimpleDriverDataSource::getUsername, SimpleDriverDataSource::setUsername); |
|
|
|
add(DataSourceProperty.USERNAME, SimpleDriverDataSource::getUsername, SimpleDriverDataSource::setUsername); |
|
|
|
add(DataSourceProperty.PASSWORD, SimpleDriverDataSource::getPassword, SimpleDriverDataSource::setPassword); |
|
|
|
add(DataSourceProperty.PASSWORD, SimpleDriverDataSource::getPassword, SimpleDriverDataSource::setPassword); |
|
|
|
} |
|
|
|
} |
|
|
|
|