PathMatchingResourcePatternResolver is not able to resolve file in SpringBoot Packaged JAR #34126
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
This issue is happening for Spring Boot generated JAR file
When resolving for a path in JAR file
jar:file:~/Documents/_GIT/xxxxx/example.jar!/BOOT-INF/classes!/com/xxxx
inPathMatchingResourcePatternResolver.
. The changes done in this commit seem to cause an issue.Old Code:
New Code
Upon analyzing, I noticed
jarFile.entries()
produces a different file path compared tojarFile.stream().map(JarEntry::getName)
. For the new code, the generated entryPath has theBOOT-INFO/
prefix added to it and the following .startsWith() check fails because of that.This creates problems in resolving a resource in the Spring-Boot generated JAR File for New Code.
The text was updated successfully, but these errors were encountered: