类 HealthStatusHttpMapper
- java.lang.Object
- org.springframework.boot.actuate.health.HealthStatusHttpMapper
public class HealthStatusHttpMapper extends Object
Map aStatus
to an HTTP status code.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 HealthStatusHttpMapper()
Create a new instance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addStatusMapping(String statusCode, Integer httpStatus)
Add a status mapping to the existing set.void
addStatusMapping(Map<String,Integer> statusMapping)
Add specific status mappings to the existing set.void
addStatusMapping(Status status, Integer httpStatus)
Add a status mapping to the existing set.Map<String,Integer>
getStatusMapping()
Return an immutable view of the status mapping.int
mapStatus(Status status)
Map the specifiedStatus
to an HTTP status code.void
setStatusMapping(Map<String,Integer> statusMapping)
Set specific status mappings.
构造器详细资料
HealthStatusHttpMapper
public HealthStatusHttpMapper()
Create a new instance.
方法详细资料
setStatusMapping
public void setStatusMapping(Map<String,Integer> statusMapping)
Set specific status mappings.- 参数:
statusMapping
- a map of health status code to HTTP status code
addStatusMapping
public void addStatusMapping(Map<String,Integer> statusMapping)
Add specific status mappings to the existing set.- 参数:
statusMapping
- a map of health status code to HTTP status code
addStatusMapping
public void addStatusMapping(Status status, Integer httpStatus)
Add a status mapping to the existing set.- 参数:
status
- the status to maphttpStatus
- the http status
addStatusMapping
public void addStatusMapping(String statusCode, Integer httpStatus)
Add a status mapping to the existing set.- 参数:
statusCode
- the status code to maphttpStatus
- the http status
getStatusMapping
public Map<String,Integer> getStatusMapping()
Return an immutable view of the status mapping.- 返回:
- the http status codes mapped by status name