Skip to content

Spring's AbstractResource (used in spring-mvc) is unusable in Docker. [SPR-12862] #17460

@spring-projects-issues

Description

@spring-projects-issues

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:

1 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: declinedA suggestion or change that we don't feel we should currently apply

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions