Commit 1732d8cc authored by Brian Clozel's avatar Brian Clozel

Merge branch '2.4.x'

Closes gh-26233
parents 32a87fcb 7be9c268
...@@ -426,6 +426,7 @@ public class WebMvcAutoConfiguration { ...@@ -426,6 +426,7 @@ public class WebMvcAutoConfiguration {
customizer.accept(registration); customizer.accept(registration);
registration.setCachePeriod(getSeconds(this.resourceProperties.getCache().getPeriod())); registration.setCachePeriod(getSeconds(this.resourceProperties.getCache().getPeriod()));
registration.setCacheControl(this.resourceProperties.getCache().getCachecontrol().toHttpCacheControl()); registration.setCacheControl(this.resourceProperties.getCache().getCachecontrol().toHttpCacheControl());
registration.setUseLastModified(this.resourceProperties.getCache().isUseLastModified());
customizeResourceHandlerRegistration(registration); customizeResourceHandlerRegistration(registration);
} }
......
...@@ -1009,7 +1009,7 @@ class WebMvcAutoConfigurationTests { ...@@ -1009,7 +1009,7 @@ class WebMvcAutoConfigurationTests {
Consumer<ResourceHttpRequestHandler> handlerConsumer) { Consumer<ResourceHttpRequestHandler> handlerConsumer) {
Map<String, Object> handlerMap = getHandlerMap(context.getBean("resourceHandlerMapping", HandlerMapping.class)); Map<String, Object> handlerMap = getHandlerMap(context.getBean("resourceHandlerMapping", HandlerMapping.class));
assertThat(handlerMap).hasSize(2); assertThat(handlerMap).hasSize(2);
for (Object handler : handlerMap.keySet()) { for (Object handler : handlerMap.values()) {
if (handler instanceof ResourceHttpRequestHandler) { if (handler instanceof ResourceHttpRequestHandler) {
handlerConsumer.accept((ResourceHttpRequestHandler) handler); handlerConsumer.accept((ResourceHttpRequestHandler) handler);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment