Interface HttpCodeStatusMapper

All Known Implementing Classes:
SimpleHttpCodeStatusMapper
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface HttpCodeStatusMapper
Strategy used to map a health status to an HTTP status code.
Since:
2.2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    An HttpCodeStatusMapper instance using default mappings.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getStatusCode(org.springframework.boot.health.contributor.Status status)
    Return the HTTP status code that corresponds to the given health status.
  • Field Details

  • Method Details

    • getStatusCode

      int getStatusCode(org.springframework.boot.health.contributor.Status status)
      Return the HTTP status code that corresponds to the given health status.
      Parameters:
      status - the health status to map
      Returns:
      the corresponding HTTP status code