Skip to content

spring boot loader JarURLConnection getLastModified always return 0 #9867

@flym

Description

@flym

When I use spring boot war (with tomcat embed) run, when new war deploy(which jsp changed), but tomcat not generate new jsp.java or jsp.class.

as the issue https://bz.apache.org/bugzilla/show_bug.cgi?id=61125
said,it use url.getLastModified to judge.

but in spring boot war, it finally use JarURLConnection.getLastModified method to get the new modified time. i debug the program find it always return 0.

i open a new project, use the code bellow

URL url = new URL("jar:file:d:/xx.war!/WEB-INF/views/main.jsp");
long x = url.openConnection().getLastModified();

it return right time.
i think it should use the jarEntry.getLastModifiedTime(or getTime).

spring boot loader version: 1.5.3.RELEASE (i find 1.5.5 the same code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions