Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
758b80a0
Commit
758b80a0
authored
Dec 05, 2019
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x' into 2.2.x
Closes gh-19299
parents
fec61b5b
c6d4ff6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
DataSourceHealthIndicator.java
...ramework/boot/actuate/jdbc/DataSourceHealthIndicator.java
+8
-10
No files found.
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/jdbc/DataSourceHealthIndicator.java
View file @
758b80a0
...
@@ -107,16 +107,14 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
...
@@ -107,16 +107,14 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
String
product
=
getProduct
();
String
product
=
getProduct
();
builder
.
up
().
withDetail
(
"database"
,
product
);
builder
.
up
().
withDetail
(
"database"
,
product
);
String
validationQuery
=
getValidationQuery
(
product
);
String
validationQuery
=
getValidationQuery
(
product
);
if
(
StringUtils
.
hasText
(
validationQuery
))
{
try
{
try
{
// Avoid calling getObject as it breaks MySQL on Java 7
// Avoid calling getObject as it breaks MySQL on Java 7
List
<
Object
>
results
=
this
.
jdbcTemplate
.
query
(
validationQuery
,
new
SingleColumnRowMapper
());
List
<
Object
>
results
=
this
.
jdbcTemplate
.
query
(
validationQuery
,
new
SingleColumnRowMapper
());
Object
result
=
DataAccessUtils
.
requiredSingleResult
(
results
);
Object
result
=
DataAccessUtils
.
requiredSingleResult
(
results
);
builder
.
withDetail
(
"result"
,
result
);
builder
.
withDetail
(
"result"
,
result
);
}
}
finally
{
finally
{
builder
.
withDetail
(
"validationQuery"
,
validationQuery
);
builder
.
withDetail
(
"validationQuery"
,
validationQuery
);
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment