@ConfigurationProperties(prefix="endpoints.health") public class HealthMvcEndpoint extends AbstractEndpointMvcAdapter<HealthEndpoint> implements org.springframework.context.EnvironmentAware
HealthEndpoint
as an MvcEndpoint
.DISABLED_RESPONSE
Constructor and Description |
---|
HealthMvcEndpoint(HealthEndpoint delegate) |
HealthMvcEndpoint(HealthEndpoint delegate,
boolean secure) |
HealthMvcEndpoint(HealthEndpoint delegate,
boolean secure,
List<String> roles) |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
addStatusMapping(String statusCode,
org.springframework.http.HttpStatus httpStatus)
Add a status mapping to the existing set.
|
protected boolean |
exposeHealthDetails(HttpServletRequest request,
Principal principal) |
Object |
invoke(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.
|
getDelegate, getDisabledResponse, getEndpointType, getName, getPath, invoke, isSensitive, setPath
public HealthMvcEndpoint(HealthEndpoint delegate)
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure)
public HealthMvcEndpoint(HealthEndpoint delegate, boolean secure, List<String> roles)
public void setEnvironment(org.springframework.core.env.Environment environment)
setEnvironment
in interface org.springframework.context.EnvironmentAware
public void setStatusMapping(Map<String,org.springframework.http.HttpStatus> statusMapping)
statusMapping
- a map of status code to HttpStatus
public void addStatusMapping(Map<String,org.springframework.http.HttpStatus> statusMapping)
statusMapping
- a map of status code to HttpStatus
public void addStatusMapping(Status status, org.springframework.http.HttpStatus httpStatus)
status
- the status to maphttpStatus
- the http statuspublic void addStatusMapping(String statusCode, org.springframework.http.HttpStatus httpStatus)
statusCode
- the status code to maphttpStatus
- the http status@ActuatorGetMapping @ResponseBody public Object invoke(HttpServletRequest request, Principal principal)
protected boolean exposeHealthDetails(HttpServletRequest request, Principal principal)
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.