|
|
|
@ -69,24 +69,23 @@ import org.springframework.web.util.UrlPathHelper; |
|
|
|
* according to the guidelines of Page Speed, YSlow, etc. |
|
|
|
* according to the guidelines of Page Speed, YSlow, etc. |
|
|
|
* |
|
|
|
* |
|
|
|
* <p>The {@linkplain #setLocations "locations"} property takes a list of Spring |
|
|
|
* <p>The {@linkplain #setLocations "locations"} property takes a list of Spring |
|
|
|
* {@link Resource} locations from which static resources are allowed to |
|
|
|
* {@link Resource} locations from which static resources are allowed to be served |
|
|
|
* be served by this handler. Resources could be served from a classpath location, |
|
|
|
* by this handler. Resources could be served from a classpath location, e.g. |
|
|
|
* e.g. "classpath:/META-INF/public-web-resources/", allowing convenient packaging |
|
|
|
* "classpath:/META-INF/public-web-resources/", allowing convenient packaging |
|
|
|
* and serving of resources such as .js, .css, and others in jar files. |
|
|
|
* and serving of resources such as .js, .css, and others in jar files. |
|
|
|
* |
|
|
|
* |
|
|
|
* <p>This request handler may also be configured with a |
|
|
|
* <p>This request handler may also be configured with a |
|
|
|
* {@link #setResourceResolvers(List) resourcesResolver} and |
|
|
|
* {@link #setResourceResolvers(List) resourcesResolver} and |
|
|
|
* {@link #setResourceTransformers(List) resourceTransformer} chains to support |
|
|
|
* {@link #setResourceTransformers(List) resourceTransformer} chains to support |
|
|
|
* arbitrary resolution and transformation of resources being served. By default a |
|
|
|
* arbitrary resolution and transformation of resources being served. By default |
|
|
|
* {@link PathResourceResolver} simply finds resources based on the configured |
|
|
|
* a {@link PathResourceResolver} simply finds resources based on the configured |
|
|
|
* "locations". An application can configure additional resolvers and |
|
|
|
* "locations". An application can configure additional resolvers and transformers |
|
|
|
* transformers such as the {@link VersionResourceResolver} which can resolve |
|
|
|
* such as the {@link VersionResourceResolver} which can resolve and prepare URLs |
|
|
|
* and prepare URLs for resources with a version in the URL. |
|
|
|
* for resources with a version in the URL. |
|
|
|
* |
|
|
|
* |
|
|
|
* <p>This handler also properly evaluates the {@code Last-Modified} header (if |
|
|
|
* <p>This handler also properly evaluates the {@code Last-Modified} header |
|
|
|
* present) so that a {@code 304} status code will be returned as appropriate, |
|
|
|
* (if present) so that a {@code 304} status code will be returned as appropriate, |
|
|
|
* avoiding unnecessary overhead for resources that are already cached by the |
|
|
|
* avoiding unnecessary overhead for resources that are already cached by the client. |
|
|
|
* client. |
|
|
|
|
|
|
|
* |
|
|
|
* |
|
|
|
* @author Keith Donald |
|
|
|
* @author Keith Donald |
|
|
|
* @author Jeremy Grelle |
|
|
|
* @author Jeremy Grelle |
|
|
|
|