Class StaticContentSupport.FileBasedBuilder<T extends StaticContentSupport.FileBasedBuilder<T>>

    • Constructor Detail

      • FileBasedBuilder

        public FileBasedBuilder()
    • Method Detail

      • contentType

        public T contentType​(String filenameExtension,
                             MediaType contentType)
        Maps a filename extension to the response content type. To have a system wide configuration, you can use the service loader SPI MediaTypeDetector. This method can override MediaTypes detection for static content handling only.
        Parameters:
        filenameExtension - a filename extension. The part after the last {code dot '.'} in the name.
        contentType - a mapped content type
        Returns:
        updated builder
        Throws:
        NullPointerException - if any parameter is null
        IllegalArgumentException - if filenameExtension is empty