Browse Source

Merge pull request #6125 from vpavic:gh-6124

* pr/6125:
  Update DataSourceBuilder aliases
pull/6125/merge
Stephane Nicoll 10 years ago
parent
commit
ec4c8bf50d
  1. 5
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java

5
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java

@ -83,7 +83,10 @@ public class DataSourceBuilder { @@ -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…
Cancel
Save