Skip to content

Commit c33f7e2

Browse files
author
Phillip Webb
committed
Fix DataSourceConfiguration isTestOnReturn()
Fix setTestOnReturn to use isTestOnReturn.
1 parent a899e1c commit c33f7e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public DataSource dataSource() {
5454
this.pool.setMaxIdle(getMaxIdle());
5555
this.pool.setMinIdle(getMinIdle());
5656
this.pool.setTestOnBorrow(isTestOnBorrow());
57-
this.pool.setTestOnReturn(isTestOnBorrow());
57+
this.pool.setTestOnReturn(isTestOnReturn());
5858
this.pool.setValidationQuery(getValidationQuery());
5959
return this.pool;
6060
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public DataSource dataSource() {
4444
this.pool.setMaxIdle(getMaxIdle());
4545
this.pool.setMinIdle(getMinIdle());
4646
this.pool.setTestOnBorrow(isTestOnBorrow());
47-
this.pool.setTestOnReturn(isTestOnBorrow());
47+
this.pool.setTestOnReturn(isTestOnReturn());
4848
this.pool.setValidationQuery(getValidationQuery());
4949
return this.pool;
5050
}

0 commit comments

Comments
 (0)