You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is, I believe, a regression due to the changes made in this commit. A side-effect of those changes is that AbstractFileResolvingResource now proceeds with file system resolution where as, previously, it would have use the last modified header on the URL connection.
The file system resolution fails with an exception like this:
java.io.FileNotFoundException: Jar URL cannot be resolved to absolute file path because it does not reside in the file system: war:file:/home/vbao/service/vbao-web.war*/js/bootstrap.min.js
at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:215)
at org.springframework.core.io.AbstractFileResolvingResource.getFileForLastModifiedCheck(AbstractFileResolvingResource.java:67)
at org.springframework.core.io.AbstractResource.lastModified(AbstractResource.java:153)
at org.springframework.core.io.AbstractFileResolvingResource.lastModified(AbstractFileResolvingResource.java:169)
at org.springframework.web.servlet.resource.ResourceHttpRequestHandler.handleRequest(ResourceHttpRequestHandler.java:345)
…
I'm surprised that the ResourceUtils.extractArchiveURL doesn't do the job here: It should return file:/home/vbao/service/vbao-web.war in such a scenario, which is then what getFileForLastModifiedCheck enters ResourceUtils.getFile with...
I guess we should make that check more defensiveness, but nevertheless, it'd be great to find out why specifically the archive check doesn't work.
I've added a defensive fallback for FileNotFoundException, going with the URL connection check instead. Nevertheless, the archive extraction check should work fine as well here...
Andy Wilkinson opened SPR-15485 and commented
This is, I believe, a regression due to the changes made in this commit. A side-effect of those changes is that
AbstractFileResolvingResource
now proceeds with file system resolution where as, previously, it would have use the last modified header on the URL connection.The file system resolution fails with an exception like this:
Affects: 4.3.8
Reference URL: spring-projects/spring-boot#8986
Issue Links:
Referenced from: commits d43dfc7, d298561, 3daf626
The text was updated successfully, but these errors were encountered: