|
|
|
@ -834,12 +834,18 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol |
|
|
|
|
|
|
|
|
|
|
|
if (con instanceof JarURLConnection jarCon) { |
|
|
|
if (con instanceof JarURLConnection jarCon) { |
|
|
|
// Should usually be the case for traditional JAR files.
|
|
|
|
// Should usually be the case for traditional JAR files.
|
|
|
|
|
|
|
|
try { |
|
|
|
jarFile = jarCon.getJarFile(); |
|
|
|
jarFile = jarCon.getJarFile(); |
|
|
|
jarFileUrl = jarCon.getJarFileURL().toExternalForm(); |
|
|
|
jarFileUrl = jarCon.getJarFileURL().toExternalForm(); |
|
|
|
JarEntry jarEntry = jarCon.getJarEntry(); |
|
|
|
JarEntry jarEntry = jarCon.getJarEntry(); |
|
|
|
rootEntryPath = (jarEntry != null ? jarEntry.getName() : ""); |
|
|
|
rootEntryPath = (jarEntry != null ? jarEntry.getName() : ""); |
|
|
|
closeJarFile = !jarCon.getUseCaches(); |
|
|
|
closeJarFile = !jarCon.getUseCaches(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
catch (FileNotFoundException ex) { |
|
|
|
|
|
|
|
// Happens in case of cached root directory without specific subdirectory present.
|
|
|
|
|
|
|
|
return Collections.emptySet(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
// No JarURLConnection -> need to resort to URL file parsing.
|
|
|
|
// No JarURLConnection -> need to resort to URL file parsing.
|
|
|
|
// We'll assume URLs of the format "jar:path!/entry", with the protocol
|
|
|
|
// We'll assume URLs of the format "jar:path!/entry", with the protocol
|
|
|
|
|