|
|
|
@ -107,7 +107,6 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
|
|
|
|
|
String product = getProduct();
|
|
|
|
|
builder.up().withDetail("database", product);
|
|
|
|
|
String validationQuery = getValidationQuery(product);
|
|
|
|
|
if (StringUtils.hasText(validationQuery)) {
|
|
|
|
|
try {
|
|
|
|
|
// Avoid calling getObject as it breaks MySQL on Java 7
|
|
|
|
|
List<Object> results = this.jdbcTemplate.query(validationQuery, new SingleColumnRowMapper());
|
|
|
|
@ -118,7 +117,6 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
|
|
|
|
|
builder.withDetail("validationQuery", validationQuery);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String getProduct() {
|
|
|
|
|
return this.jdbcTemplate.execute((ConnectionCallback<String>) this::getProduct);
|
|
|
|
|