# Uses of Class
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistration

Packages that use ResourceHandlerRegistration
Package
Description
org.springframework.web.servlet.config.annotation
Annotation-based setup for Spring MVC.

## Uses of ResourceHandlerRegistration in org.springframework.web.servlet.config.annotation

Methods in org.springframework.web.servlet.config.annotation that return ResourceHandlerRegistration
Modifier and Type
Method
Description
`ResourceHandlerRegistration`
ResourceHandlerRegistry.`addResourceHandler(String... pathPatterns)`
Add a resource handler to serve static resources.
`ResourceHandlerRegistration`
ResourceHandlerRegistration.`addResourceLocations(String... locations)`
Add one or more resource locations from which to serve static content.
`ResourceHandlerRegistration`
ResourceHandlerRegistration.`addResourceLocations(org.springframework.core.io.Resource... locations)`
Configure locations to serve static resources from based on pre-resolved `Resource` references.
`ResourceHandlerRegistration`
ResourceHandlerRegistration.`setCacheControl(org.springframework.http.CacheControl cacheControl)`
Specify the `CacheControl` which should be used by the resource handler.
`ResourceHandlerRegistration`
ResourceHandlerRegistration.`setCachePeriod(Integer cachePeriod)`
Specify the cache period for the resources served by the resource handler, in seconds.
`ResourceHandlerRegistration`
ResourceHandlerRegistration.`setEtagGenerator(Function<org.springframework.core.io.Resource,String> etagGenerator)`
Configure a generator function that will be used to create the ETag information, given a `Resource` that is about to be written to the response.
`ResourceHandlerRegistration`
ResourceHandlerRegistration.`setOptimizeLocations(boolean optimizeLocations)`
Set whether to optimize the specified locations through an existence check on startup, filtering non-existing directories upfront so that they do not have to be checked on every resource access.
`ResourceHandlerRegistration`
ResourceHandlerRegistration.`setUseLastModified(boolean useLastModified)`
Set whether the `Resource.lastModified()` information should be used to drive HTTP responses.