java.lang.Object
java.lang.Enum<ApiVersion>
org.springframework.boot.actuate.endpoint.ApiVersion
All Implemented Interfaces:
Serializable, Comparable<ApiVersion>, Constable, Producible<ApiVersion>

public enum ApiVersion extends Enum<ApiVersion> implements Producible<ApiVersion>
API versions supported for the actuator API. This enum may be injected into actuator endpoints in order to return a response compatible with the requested version.
Since:
2.4.0
Author:
Phillip Webb
  • Enum Constant Details

    • V2

      public static final ApiVersion V2
      Version 2 (supported by Spring Boot 2.0+).
    • V3

      public static final ApiVersion V3
      Version 3 (supported by Spring Boot 2.2+).
  • Field Details

    • LATEST

      public static final ApiVersion LATEST
      The latest API version.
  • Method Details

    • values

      public static ApiVersion[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ApiVersion valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getProducedMimeType

      public MimeType getProducedMimeType()
      Description copied from interface: Producible
      Mime type that can be produced.
      Specified by:
      getProducedMimeType in interface Producible<ApiVersion>
      Returns:
      the producible mime type