When someone calls new ClassPathResource("a.file").getInputStream().available() in their application, they will get 0 if "a.file"(eg:"a.xlsx") is a ZipEntry.Store entry in the executable jar of that application. See JarFileEntries#getInputStream(FileHeader entry) method.

Comment From: pivotal-cla

@Gnaily Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-cla

@Gnaily Thank you for signing the Contributor License Agreement!

Comment From: philwebb

We should ideally add a test for this when we merge

Comment From: wilkinsona

Thanks very much for making your first contribution to Spring Boot, @Gnaily.

Comment From: licunzhi

When someone calls new ClassPathResource("a.file").getInputStream().available() in their application, they will get 0 if "a.file"(eg:"a.xlsx") is a ZipEntry.Store entry in the executable jar of that application. See JarFileEntries#getInputStream(FileHeader entry) method.

Excuse me, How can I fix this problem with the previous version?