Top Description Interfaces Classes
[default module]

Package org.springframework.web.accept

Annotations
@NonNullApi
@NonNullFields
Imports
org.springframework.lang.NonNullApi, .NonNullFields

This package contains classes used to determine the requested the media types in a request.

org.springframework.web.accept.ContentNegotiationStrategy is the main abstraction for determining requested media types with implementations based on path extensions, a a request parameter, the 'Accept' header, or a default content type.

org.springframework.web.accept.ContentNegotiationManager is used to delegate to one ore more of the above strategies in a specific order.

Interface Summary

Modifier and TypeInterface and Description
public interface
ContentNegotiationStrategy

A strategy for resolving the requested media types for a request.

public interface
MediaTypeFileExtensionResolver

Strategy to resolve a MediaType to a list of file extensions — for example, to resolve "application/json" to "json".

Class Summary

Modifier and TypeClass and Description
public abstract class
AbstractMappingContentNegotiationStrategy

Base class for ContentNegotiationStrategy implementations with the steps to resolve a request to media types.

public class
ContentNegotiationManager

Central class to determine requested media types for a request.

public class
ContentNegotiationManagerFactoryBean

Factory to create a ContentNegotiationManager and configure it with ContentNegotiationStrategy instances.

public class
FixedContentNegotiationStrategy

A ContentNegotiationStrategy that returns a fixed content type.

public class
HeaderContentNegotiationStrategy

A ContentNegotiationStrategy that checks the 'Accept' request header.

public class
MappingMediaTypeFileExtensionResolver

An implementation of MediaTypeFileExtensionResolver that maintains lookups between file extensions and MediaTypes in both directions.

public class
ParameterContentNegotiationStrategy

Strategy that resolves the requested content type from a query parameter.

public class
PathExtensionContentNegotiationStrategy

Deprecated as of 5.2.4.
A ContentNegotiationStrategy that resolves the file extension in the request path to a key to be used to look up a media type.
public class
ServletPathExtensionContentNegotiationStrategy

Deprecated as of 5.2.4.
Extends PathExtensionContentNegotiationStrategy that also uses ServletContext#getMimeType(String) to resolve file extensions.