枚举类 ApiVersion

java.lang.Object
java.lang.Enum<ApiVersion>
org.springframework.boot.actuate.endpoint.ApiVersion
所有已实现的接口:
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.
从以下版本开始:
2.4.0
作者:
Phillip Webb
  • 枚举常量详细资料

    • 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+).
  • 字段详细资料

    • LATEST

      public static final ApiVersion LATEST
      The latest API version.
  • 方法详细资料

    • values

      public static ApiVersion[] values()
      返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
      返回:
      包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
    • valueOf

      public static ApiVersion valueOf(String name)
      返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类没有带有指定名称的常量
      NullPointerException - 如果参数为空值
    • getProducedMimeType

      public MimeType getProducedMimeType()
      从接口复制的说明: Producible
      Mime type that can be produced.
      指定者:
      getProducedMimeType 在接口中 Producible<ApiVersion>
      返回:
      the producible mime type