Merge branch '6.2.x'

This commit is contained in:
Juergen Hoeller 2025-01-31 22:28:50 +01:00
commit ecc7ddd96b
1 changed files with 2 additions and 0 deletions

View File

@ -810,6 +810,8 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
NavigableSet<String> entriesCache = this.jarEntriesCache.get(jarFileUrl); NavigableSet<String> entriesCache = this.jarEntriesCache.get(jarFileUrl);
if (entriesCache != null) { if (entriesCache != null) {
Set<Resource> result = new LinkedHashSet<>(64); Set<Resource> 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 // Search sorted entries from first entry with rootEntryPath prefix
for (String entryPath : entriesCache.tailSet(rootEntryPath, false)) { for (String entryPath : entriesCache.tailSet(rootEntryPath, false)) {
if (!entryPath.startsWith(rootEntryPath)) { if (!entryPath.startsWith(rootEntryPath)) {