Commit d515595c authored by Phillip Webb's avatar Phillip Webb

Detect embedded DBs when deducing driver class

Fix DataSourceProperties getUsername() and getPassword() methods to
call getDriverClassName() rather than using `this.driverClassName` to
ensure than deduced driver classes can be used.

Fixes gh-1421
parent 5ef45c74
......@@ -118,7 +118,7 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB
if (StringUtils.hasText(this.username)) {
return this.username;
}
if (EmbeddedDatabaseConnection.isEmbedded(this.driverClassName)) {
if (EmbeddedDatabaseConnection.isEmbedded(getDriverClassName())) {
return "sa";
}
return null;
......@@ -128,7 +128,7 @@ public class DataSourceProperties implements BeanClassLoaderAware, InitializingB
if (StringUtils.hasText(this.password)) {
return this.password;
}
if (EmbeddedDatabaseConnection.isEmbedded(this.driverClassName)) {
if (EmbeddedDatabaseConnection.isEmbedded(getDriverClassName())) {
return "";
}
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment