ApiVersion
@Deprecated public enum ApiVersion extends Enum<ApiVersion>
Enum Constant and Description |
---|
V2
Deprecated.
Version 2 (supported by Spring Boot 2.0+).
|
V3
Deprecated.
Version 3 (supported by Spring Boot 2.2+).
|
Modifier and Type | Field and Description |
---|---|
static ApiVersion |
LATEST
Deprecated.
The latest API version.
|
Modifier and Type | Method and Description |
---|---|
static ApiVersion |
fromHttpHeaders(Map<String,List<String>> headers)
Deprecated.
since 2.5.0 for removal in 2.7.0 in favor of direct injection with
resolution via the
ProducibleOperationArgumentResolver . |
static ApiVersion |
valueOf(String name)
Deprecated.
Returns the enum constant of this type with the specified name.
|
static ApiVersion[] |
values()
Deprecated.
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ApiVersion V2
public static final ApiVersion V3
public static final ApiVersion LATEST
public static ApiVersion[] values()
for (ApiVersion c : ApiVersion.values()) System.out.println(c);
public static ApiVersion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Deprecated public static ApiVersion fromHttpHeaders(Map<String,List<String>> headers)
ProducibleOperationArgumentResolver
.ApiVersion
to use based on the HTTP request headers. The version
will be deduced based on the Accept
header.headers
- the HTTP headers