spring-boot/spring-boot-project/spring-boot-docs
Brian Clozel f0a6128db3 Add spring.web.resources.cache.use-last-modified
Prior to this commit, packaging a Spring Boot application as a container
image with Cloud Native Buildpacks could result in unwanted browser
caching behavior, with "Last-Modified" HTTP response headers pointing to
dates in the far past.

This is due to CNB resetting the last-modified date metadata for static
files (for build reproducibility and container layer caching) and Spring
static resource handling relying on that information when serving static
resources.

This commit introduces a new configuration property
`spring.web.resources.cache.use-last-modified` that can be used to
disable this behavior in Spring if the application is meant to run as a
container image built by CNB.

The default value for this property remains `true` since this remains
the default value in Spring Framework and using that information in
other deployment models is a perfectly valid use case.

Fixes gh-24099
2020-11-10 13:40:25 +01:00
..
src Add spring.web.resources.cache.use-last-modified 2020-11-10 13:40:25 +01:00
build.gradle Note that a Neo4j reactive transaction manager is not auto-configured 2020-10-14 13:39:38 +02:00