diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java index 2f146988379..991318051a7 100644 --- a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java +++ b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java @@ -810,6 +810,8 @@ protected Set doFindPathMatchingJarResources(Resource rootDirResource, NavigableSet entriesCache = this.jarEntriesCache.get(jarFileUrl); if (entriesCache != null) { Set result = new LinkedHashSet<>(64); + // Clean root entry path to match jar entries format without "!" separators + rootEntryPath = rootEntryPath.replace(ResourceUtils.JAR_URL_SEPARATOR, "/"); // Search sorted entries from first entry with rootEntryPath prefix for (String entryPath : entriesCache.tailSet(rootEntryPath, false)) { if (!entryPath.startsWith(rootEntryPath)) {