类 HealthMvcEndpoint
- java.lang.Object
- org.springframework.boot.actuate.endpoint.mvc.AbstractEndpointMvcAdapter<HealthEndpoint>
- org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,MvcEndpoint
,NamedMvcEndpoint
,org.springframework.context.EnvironmentAware
@ConfigurationProperties(prefix="endpoints.health") public class HealthMvcEndpoint extends AbstractEndpointMvcAdapter<HealthEndpoint> implements org.springframework.context.EnvironmentAware
Adapter to exposeHealthEndpoint
as anMvcEndpoint
.- 从以下版本开始:
- 1.1.0
字段概要
从接口继承的字段 org.springframework.boot.actuate.endpoint.mvc.MvcEndpoint
DISABLED_RESPONSE
构造器概要
构造器 构造器 说明 HealthMvcEndpoint(HealthEndpoint delegate)
HealthMvcEndpoint(HealthEndpoint delegate, boolean secure)
HealthMvcEndpoint(HealthEndpoint delegate, boolean secure, List<String> roles)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addStatusMapping(String statusCode, org.springframework.http.HttpStatus httpStatus)
Add a status mapping to the existing set.void
addStatusMapping(Map<String,org.springframework.http.HttpStatus> statusMapping)
Add specific status mappings to the existing set.void
addStatusMapping(Status status, org.springframework.http.HttpStatus httpStatus)
Add a status mapping to the existing set.protected boolean
exposeHealthDetails(javax.servlet.http.HttpServletRequest request, Principal principal)
Object
invoke(javax.servlet.http.HttpServletRequest request, Principal principal)
void
setEnvironment(org.springframework.core.env.Environment environment)
void
setStatusMapping(Map<String,org.springframework.http.HttpStatus> statusMapping)
Set specific status mappings.从类继承的方法 org.springframework.boot.actuate.endpoint.mvc.AbstractEndpointMvcAdapter
getDelegate, getDisabledResponse, getEndpointType, getName, getPath, invoke, isSensitive, setPath
构造器详细资料
HealthMvcEndpoint
public HealthMvcEndpoint(HealthEndpoint delegate)
HealthMvcEndpoint
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure)
HealthMvcEndpoint
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure, List<String> roles)
方法详细资料
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment)
- 指定者:
setEnvironment
在接口中org.springframework.context.EnvironmentAware
setStatusMapping
public void setStatusMapping(Map<String,org.springframework.http.HttpStatus> statusMapping)
Set specific status mappings.- 参数:
statusMapping
- a map of status code toHttpStatus
addStatusMapping
public void addStatusMapping(Map<String,org.springframework.http.HttpStatus> statusMapping)
Add specific status mappings to the existing set.- 参数:
statusMapping
- a map of status code toHttpStatus
addStatusMapping
public void addStatusMapping(Status status, org.springframework.http.HttpStatus httpStatus)
Add a status mapping to the existing set.- 参数:
status
- the status to maphttpStatus
- the http status
addStatusMapping
public void addStatusMapping(String statusCode, org.springframework.http.HttpStatus httpStatus)
Add a status mapping to the existing set.- 参数:
statusCode
- the status code to maphttpStatus
- the http status
invoke
@ActuatorGetMapping @ResponseBody public Object invoke(javax.servlet.http.HttpServletRequest request, Principal principal)
exposeHealthDetails
protected boolean exposeHealthDetails(javax.servlet.http.HttpServletRequest request, Principal principal)