mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Update DataSourceBuilder aliases
This commit adds a `user` alias for the `username` property which permits the use of `OracleDataSource`. Closes gh-6124, gh-6027, gh-6125
This commit is contained in:
parent
31fc1cc6f2
commit
6dde498b87
@ -83,7 +83,10 @@ public class DataSourceBuilder {
|
||||
|
||||
private void bind(DataSource result) {
|
||||
MutablePropertyValues properties = new MutablePropertyValues(this.properties);
|
||||
new RelaxedDataBinder(result).withAlias("url", "jdbcUrl").bind(properties);
|
||||
new RelaxedDataBinder(result)
|
||||
.withAlias("url", "jdbcUrl")
|
||||
.withAlias("username", "user")
|
||||
.bind(properties);
|
||||
}
|
||||
|
||||
public DataSourceBuilder type(Class<? extends DataSource> type) {
|
||||
|
Loading…
Reference in New Issue
Block a user