Interface LastModified


@Deprecated public interface LastModified
Deprecated.
as of 5.3.9 in favor of using the checkNotModified methods in WebRequest, or from an annotated controller method, returning a ResponseEntity with an "ETag" and/or "Last-Modified" headers set.
Supports last-modified HTTP requests to facilitate content caching. Same contract as for the Servlet API's getLastModified method.

Delegated to by a HandlerAdapter.getLastModified(jakarta.servlet.http.HttpServletRequest, java.lang.Object) implementation. By default, any Controller or HttpRequestHandler within Spring's default framework can implement this interface to enable last-modified checking.

Note: Alternative handler implementation approaches have different last-modified handling styles. For example, Spring 2.5's annotated controller approach (using @RequestMapping) provides last-modified support through the WebRequest.checkNotModified(long) method, allowing for last-modified checking within the main handler method.

Author:
Rod Johnson, Juergen Hoeller
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Deprecated.
    Same contract as for HttpServlet's getLastModified method.