类 HealthEndpoint
- java.lang.Object
- org.springframework.boot.actuate.health.HealthEndpoint
@Endpoint(id="health") public class HealthEndpoint extends Object
Endpoint
to expose application health information.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 HealthEndpoint(HealthIndicator healthIndicator)
Create a newHealthEndpoint
instance that will use the givenhealthIndicator
to generate its response.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Health
health()
Health
healthForComponent(String component)
Return theHealth
of a particular component ornull
if such component does not exist.Health
healthForComponentInstance(String component, String instance)
Return theHealth
of a particularinstance
managed by the specifiedcomponent
ornull
if that particular component is not aCompositeHealthIndicator
or if such instance does not exist.
构造器详细资料
HealthEndpoint
public HealthEndpoint(HealthIndicator healthIndicator)
Create a newHealthEndpoint
instance that will use the givenhealthIndicator
to generate its response.- 参数:
healthIndicator
- the health indicator
方法详细资料
health
@ReadOperation public Health health()
healthForComponent
@ReadOperation public Health healthForComponent(@Selector String component)
Return theHealth
of a particular component ornull
if such component does not exist.- 参数:
component
- the name of a particularHealthIndicator
- 返回:
- the
Health
for the component ornull
healthForComponentInstance
@ReadOperation public Health healthForComponentInstance(@Selector String component, @Selector String instance)
Return theHealth
of a particularinstance
managed by the specifiedcomponent
ornull
if that particular component is not aCompositeHealthIndicator
or if such instance does not exist.- 参数:
component
- the name of a particularCompositeHealthIndicator
instance
- the name of an instance managed by that component- 返回:
- the
Health
for the component instance ofnull