Skip to content

Commit 4348172

Browse files
author
Dave Syer
committed
Fix bug in DataSourceBuilder
1 parent 0938a87 commit 4348172

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ public DataSource build() {
7575
}
7676

7777
private void maybeGetDriverClassName() {
78-
if (!this.properties.containsKey("driverClassName")) {
78+
if (!this.properties.containsKey("driverClassName")
79+
&& this.properties.containsKey("url")) {
7980
String cls = this.driverClassNameProvider.getDriverClassName(this.properties
8081
.get("url"));
8182
this.properties.put("driverClassName", cls);

0 commit comments

Comments
 (0)