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