类 ParameterContentNegotiationStrategy

所有已实现的接口:
ContentNegotiationStrategy, MediaTypeFileExtensionResolver

public class ParameterContentNegotiationStrategy extends AbstractMappingContentNegotiationStrategy
Strategy that resolves the requested content type from a query parameter. The default query parameter name is "format".

You can register static mappings between keys (i.e. the expected value of the query parameter) and MediaType's via MappingMediaTypeFileExtensionResolver.addMapping(String, MediaType). this strategy also supports dynamic lookups of keys via MediaType.fromFileName(String).

从以下版本开始:
4.0
作者:
Rossen Stoyanchev
  • 字段详细资料

    • parameterName

      private String parameterName
  • 构造器详细资料

    • ParameterContentNegotiationStrategy

      public ParameterContentNegotiationStrategy(Map<String,MediaType> mediaTypes)
      Create an instance with the given map of file extensions and media types.
  • 方法详细资料