Java org.springframework.web.servlet.resource ResourceHttpRequestHandler fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.web.servlet.resource ResourceHttpRequestHandler fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.web.servlet.resource ResourceHttpRequestHandler.

The text is from its open source code.

Subclass

org.springframework.web.servlet.resource.ResourceHttpRequestHandler has subclasses.
Click this link to see all its subclasses.

Constructor

Method

ListgetLocations()
Return the configured List of Resource locations.
ListgetResourceResolvers()
Return the list of configured resource resolvers.
voidhandleRequest(HttpServletRequest request, HttpServletResponse response)
Processes a resource request.
voidsetCacheSeconds(int seconds)
Cache content for the given number of seconds, by writing cache-related HTTP headers to the response:
  • seconds == -1 (default value): no generation cache-related headers
  • seconds == 0: "Cache-Control: no-store" will prevent caching
  • seconds > 0: "Cache-Control: max-age=seconds" will ask to cache content

For more specific needs, a custom org.springframework.http.CacheControl should be used.

voidsetLocations(List locations)
Set the List of Resource locations to use as sources for serving static resources.