Class PathExtensionContentNegotiationStrategy

All Implemented Interfaces:
ContentNegotiationStrategy, MediaTypeFileExtensionResolver
Direct Known Subclasses:
ServletPathExtensionContentNegotiationStrategy

@Deprecated public class PathExtensionContentNegotiationStrategy extends AbstractMappingContentNegotiationStrategy
Deprecated.
as of 5.2.4. See class-level note in ContentNegotiationManagerFactoryBean on the deprecation of path extension config options.
A ContentNegotiationStrategy that resolves the file extension in the request path to a key to be used to look up a media type.

If the file extension is not found in the explicit registrations provided to the constructor, the MediaTypeFactory is used as a fallback mechanism.

Since:
3.2
Author:
Rossen Stoyanchev
  • Constructor Details

    • PathExtensionContentNegotiationStrategy

      public PathExtensionContentNegotiationStrategy()
      Deprecated.
      Create an instance without any mappings to start with. Mappings may be added later on if any extensions are resolved through the Java Activation framework.
    • PathExtensionContentNegotiationStrategy

      public PathExtensionContentNegotiationStrategy(@Nullable Map<String,MediaType> mediaTypes)
      Deprecated.
      Create an instance with the given map of file extensions and media types.
  • Method Details