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:
Vedran Pavic 2016-06-07 21:40:12 +02:00 committed by Stephane Nicoll
parent 31fc1cc6f2
commit 6dde498b87

View File

@ -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) {