spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/http/ApiVersion.java
/**
	 * Return the {@link ApiVersion} to use based on the HTTP request headers. The version
	 * will be deduced based on the {@code Accept} header.
	 * @param headers the HTTP headers
	 * @return the API version to use
	 * @deprecated since 2.5.0 for removal in 2.7.0 in favor of direct injection with
	 * resolution via the {@link ProducibleOperationArgumentResolver}.
	 */
Return the  ApiVersion to use based on the HTTP request headers. The version
will be deduced based on the  Accept header.
@param headers the HTTP headers
@return the API version to use
@deprecated since 2.5.0 for removal in 2.7.0 in favor of direct injection with
resolution via the  ProducibleOperationArgumentResolver.
Return the ApiVersion to use based on the HTTP request headers . The version will be deduced based on the Accept header . @param headers the HTTP headers @return the API version to use @deprecated since 2 . 5 . 0 for removal in 2 . 7 . 0 in favor of direct injection with resolution via the ProducibleOperationArgumentResolver .
@Deprecated
	public static ApiVersion fromHttpHeaders(Map<String, List<String>> headers) {
		ApiVersion version = null;
		List<String> accepts = headers.get("Accept");
		if (!CollectionUtils.isEmpty(accepts)) {
			for (String accept : accepts) {
				for (String type : MimeTypeUtils.tokenize(accept)) {
					version = mostRecent(version, forType(type));
				}
			}
		}
		return (version != null) ? version : LATEST;
	}
@ Deprecated public static ApiVersion fromHttpHeaders ( Map < String , List < String > > headers ) { ApiVersion version = null ; List < String > accepts = headers . get ( "Accept" ) ; if ( ! CollectionUtils . isEmpty ( accepts ) ) { for ( String accept : accepts ) { for ( String type : MimeTypeUtils . tokenize ( accept ) ) { version = mostRecent ( version , forType ( type ) ) ; } } } return ( version != null ) ? version : LATEST ; }
Return the {@link ApiVersion} to use based on the HTTP request headers.
Return the { @link ApiVersion } to use based on the HTTP request headers .