程序包 org.springframework.web.accept
This package contains classes used to determine the requested the media types in a request.
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.
ContentNegotiationManager is used to delegate to one ore more of the above strategies in a specific order.
接口概要 接口 说明 ContentNegotiationStrategy A strategy for resolving the requested media types for a request.MediaTypeFileExtensionResolver Strategy to resolveMediaTypeto a list of file extensions.类概要 类 说明 AbstractMappingContentNegotiationStrategy Base class forContentNegotiationStrategyimplementations with the steps to resolve a request to media types.ContentNegotiationManager Central class to determine requested media types for a request.ContentNegotiationManagerFactoryBean Factory to create aContentNegotiationManagerand configure it with one or moreContentNegotiationStrategyinstances via simple setters.FixedContentNegotiationStrategy AContentNegotiationStrategythat returns a fixed content type.HeaderContentNegotiationStrategy AContentNegotiationStrategythat checks the 'Accept' request header.MappingMediaTypeFileExtensionResolver An implementation ofMediaTypeFileExtensionResolverthat maintains lookups between file extensions and MediaTypes in both directions.ParameterContentNegotiationStrategy AContentNegotiationStrategythat resolves a query parameter to a key to be used to look up a media type.PathExtensionContentNegotiationStrategy AContentNegotiationStrategythat resolves the file extension in the request path to a key to be used to look up a media type.ServletPathExtensionContentNegotiationStrategy ExtendsPathExtensionContentNegotiationStrategythat also usesServletContext.getMimeType(String)to resolve file extensions.