From 6dde498b87bb8837e1ed3f36adf1e16757350ff6 Mon Sep 17 00:00:00 2001 From: Vedran Pavic Date: Tue, 7 Jun 2016 21:40:12 +0200 Subject: [PATCH] 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 --- .../boot/autoconfigure/jdbc/DataSourceBuilder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java index e81eb99c432..d6a48e7f799 100644 --- a/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java +++ b/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBuilder.java @@ -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 type) {