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
d20ed65c
Commit
d20ed65c
authored
May 22, 2014
by
Christian Dupuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs for new extended health support
fixes #930
parent
297d14f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
production-ready-features.adoc
...oot-docs/src/main/asciidoc/production-ready-features.adoc
+12
-2
No files found.
spring-boot-docs/src/main/asciidoc/production-ready-features.adoc
View file @
d20ed65c
...
@@ -151,10 +151,10 @@ To provide custom health information you can register a Spring bean that impleme
...
@@ -151,10 +151,10 @@ To provide custom health information you can register a Spring bean that impleme
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Component;
@Component
@Component
public class MyHealth implements HealthIndicator
<String>
{
public class MyHealth implements HealthIndicator {
@Override
@Override
public
String
health() {
public
Health
health() {
// perform some specific health check
// perform some specific health check
return ...
return ...
}
}
...
@@ -170,6 +170,16 @@ Redis, MongoDB and RabbitMQ.
...
@@ -170,6 +170,16 @@ Redis, MongoDB and RabbitMQ.
Spring Boot adds the `HealthIndicator` instances automatically if beans of type `DataSource`,
Spring Boot adds the `HealthIndicator` instances automatically if beans of type `DataSource`,
`MongoTemplate`, `RedisConnectionFactory`, `RabbitTemplate` are present in the `ApplicationContext`.
`MongoTemplate`, `RedisConnectionFactory`, `RabbitTemplate` are present in the `ApplicationContext`.
Besides implementing custom `HealthIndicator`s and using out-of-box {sc-spring-boot-actuator}/health/Status.{sc-ext}[`Status`]
types, it is also possible to introduce custom `Status` types for different or more complex system
states. In that case a custom implementation of the {sc-spring-boot-actuator}/health/HealthAggregator.{sc-ext}[`HealthAggregator`]
interface needs to be provided or the default implementation has to be configured using the
`health.status.order` configuration property.
Assuming a new `Status` with code `FATAL` is being used in one of your `HealthIndicator`
implementations. To configure the severity or order add the following to your application properties:
`healt.status.order: FATAL, DOWN, UNKOWN, UP`.
[[production-ready-application-info]]
[[production-ready-application-info]]
...
...
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