Class SimpleHttpCodeStatusMapper

java.lang.Object
org.springframework.boot.health.actuate.endpoint.SimpleHttpCodeStatusMapper
All Implemented Interfaces:
HttpCodeStatusMapper

@Deprecated(since="4.1.0", forRemoval=true) public class SimpleHttpCodeStatusMapper extends Object implements HttpCodeStatusMapper
Deprecated, for removal: This API element is subject to removal in a future version.
since 4.1.0 for removal in 4.3.0 in favor of HttpCodeStatusMapper.of(Map)
Simple HttpCodeStatusMapper backed by map of status code to HTTP status code.
Since:
4.0.0
Author:
Stephane Nicoll, Phillip Webb
  • Constructor Details

    • SimpleHttpCodeStatusMapper

      public SimpleHttpCodeStatusMapper()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new SimpleHttpCodeStatusMapper instance using default mappings.
    • SimpleHttpCodeStatusMapper

      public SimpleHttpCodeStatusMapper(@Nullable Map<String,Integer> mappings)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new SimpleHttpCodeStatusMapper with the specified mappings.
      Parameters:
      mappings - the mappings to use or null to use the default mappings
  • Method Details

    • getStatusCode

      public int getStatusCode(Status status)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: HttpCodeStatusMapper
      Return the HTTP status code that corresponds to the given health status.
      Specified by:
      getStatusCode in interface HttpCodeStatusMapper
      Parameters:
      status - the health status to map
      Returns:
      the corresponding HTTP status code