-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
Nicholas Wertzberger opened SPR-12862 and commented
It appears that Spring does a sanity check on the lastModified date of files before using them with the AbstractResource class.
When using spring templates to render a UI for an html page, this sanity check fails on docker images, which appear to have a lastModified date of Jan 1, 1970 (an epoch time of 0L).
This means that no spring-mvc app works in a docker container without some echo -n >> /path/to/file's (totally ruining the point) to start up the container.
Here's the failing line:
http://grepcode.com/file/repo1.maven.org/maven2/org.springframework/spring-core/4.1.4.RELEASE/org/springframework/core/io/AbstractResource.java?av=f#152
P.S. I also have a bug with docker to not have a last modified of NEVER, but it seems weird that you would fail completely on this.
Affects: 4.1.4
Reference URL: http://stackoverflow.com/questions/29337432/spring-templates-in-docker-container/29337588#29337588
Issue Links:
- HTTP 404 for static resources with last modified = 0L (breaks Docker images build with Jib) [SPR-17320] #21853 HTTP 404 for static resources with last modified = 0L (breaks Docker images build with Jib)
1 votes, 5 watchers