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 {
customizer.accept(registration);
registration.setCachePeriod(getSeconds(this.resourceProperties.getCache().getPeriod()));
registration.setCacheControl(this.resourceProperties.getCache().getCachecontrol().toHttpCacheControl());
registration.setUseLastModified(this.resourceProperties.getCache().isUseLastModified());
customizeResourceHandlerRegistration(registration);
}
......
......@@ -1009,7 +1009,7 @@ class WebMvcAutoConfigurationTests {
Consumer<ResourceHttpRequestHandler> handlerConsumer) {
Map<String, Object> handlerMap = getHandlerMap(context.getBean("resourceHandlerMapping", HandlerMapping.class));
assertThat(handlerMap).hasSize(2);
for (Object handler : handlerMap.keySet()) {
for (Object handler : handlerMap.values()) {
if (handler instanceof ResourceHttpRequestHandler) {
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