static ResourceHandlerBuilder |
ResourceHandlerBuilder.classpathHandler(java.lang.String classpathRoot) |
Creates a handler that serves files from the classpath..
|
static ResourceHandlerBuilder |
ResourceHandlerBuilder.fileHandler(java.io.File baseDirectory) |
Creates a handler that serves files from the given directory.
|
static ResourceHandlerBuilder |
ResourceHandlerBuilder.fileHandler(java.lang.String directoryPath) |
Creates a handler that serves files from the given directory.
|
static ResourceHandlerBuilder |
ResourceHandlerBuilder.fileHandler(java.nio.file.Path path) |
Creates a handler that serves files from the given directory.
|
static ResourceHandlerBuilder |
ResourceHandlerBuilder.fileOrClasspath(java.lang.String fileRootIfExists,
java.lang.String classpathRoot) |
Creates a resource handler that serves from the file system if the directory exists; otherwise from the class path.
|
ResourceHandlerBuilder |
ResourceHandlerBuilder.withDefaultFile(java.lang.String defaultFile) |
Specifies the file to use when a request such as /web/ is made.
|
ResourceHandlerBuilder |
ResourceHandlerBuilder.withDirectoryListing(boolean enabled) |
Specifies whether or not to allow directory listing.
|
ResourceHandlerBuilder |
ResourceHandlerBuilder.withDirectoryListingCSS(java.lang.String css) |
Specifies CSS to use for the HTML directory listing page, if directory listing is enabled.
|
ResourceHandlerBuilder |
ResourceHandlerBuilder.withDirectoryListingDateFormatter(java.time.format.DateTimeFormatter dateTimeFormatter) |
Specifies a custom date format for the "Last modified" column when directory listing is enabled.
|
ResourceHandlerBuilder |
ResourceHandlerBuilder.withExtensionToResourceType(java.util.Map<java.lang.String,ResourceType> extensionToResourceType) |
Specify custom filename extension to mime-type mappings.
|
ResourceHandlerBuilder |
ResourceHandlerBuilder.withResourceCustomizer(ResourceCustomizer resourceCustomizer) |
Registers a hook to intercept responses, allowing things such as response header customization based on the request.
|