open class ResourceHandlerRegistration
Assist with creating and configuring a static resources handler.
Author
Rossen Stoyanchev
Since
5.0
ResourceHandlerRegistration(resourceLoader: ResourceLoader, vararg pathPatterns: String)
Create a ResourceHandlerRegistration instance. |
open fun addResourceLocations(vararg resourceLocations: String): ResourceHandlerRegistration
Add one or more resource locations from which to serve static content. Each location must point to a valid directory. Multiple locations may be specified as a comma-separated list, and the locations will be checked for a given resource in the order specified. For example, { |
|
open fun resourceChain(cacheResources: Boolean): ResourceChainRegistrationopen fun resourceChain(cacheResources: Boolean, cache: Cache): ResourceChainRegistration
Configure a chain of resource resolvers and transformers to use. This can be useful, for example, to apply a version strategy to resource URLs. If this method is not invoked, by default only a simple |
|
open fun setCacheControl(cacheControl: CacheControl): ResourceHandlerRegistration
Specify the CacheControl which should be used by the resource handler. |