|
|
|
@ -290,7 +290,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol |
|
|
|
// Generally only look for a pattern after a prefix here,
|
|
|
|
// Generally only look for a pattern after a prefix here,
|
|
|
|
// and on Tomcat only after the "*/" separator for its "war:" protocol.
|
|
|
|
// and on Tomcat only after the "*/" separator for its "war:" protocol.
|
|
|
|
int prefixEnd = (locationPattern.startsWith("war:") ? locationPattern.indexOf("*/") + 1 : |
|
|
|
int prefixEnd = (locationPattern.startsWith("war:") ? locationPattern.indexOf("*/") + 1 : |
|
|
|
locationPattern.indexOf(":") + 1); |
|
|
|
locationPattern.indexOf(':') + 1); |
|
|
|
if (getPathMatcher().isPattern(locationPattern.substring(prefixEnd))) { |
|
|
|
if (getPathMatcher().isPattern(locationPattern.substring(prefixEnd))) { |
|
|
|
// a file pattern
|
|
|
|
// a file pattern
|
|
|
|
return findPathMatchingResources(locationPattern); |
|
|
|
return findPathMatchingResources(locationPattern); |
|
|
|
@ -531,7 +531,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol |
|
|
|
* @see #retrieveMatchingFiles |
|
|
|
* @see #retrieveMatchingFiles |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected String determineRootDir(String location) { |
|
|
|
protected String determineRootDir(String location) { |
|
|
|
int prefixEnd = location.indexOf(":") + 1; |
|
|
|
int prefixEnd = location.indexOf(':') + 1; |
|
|
|
int rootDirEnd = location.length(); |
|
|
|
int rootDirEnd = location.length(); |
|
|
|
while (rootDirEnd > prefixEnd && getPathMatcher().isPattern(location.substring(prefixEnd, rootDirEnd))) { |
|
|
|
while (rootDirEnd > prefixEnd && getPathMatcher().isPattern(location.substring(prefixEnd, rootDirEnd))) { |
|
|
|
rootDirEnd = location.lastIndexOf('/', rootDirEnd - 2) + 1; |
|
|
|
rootDirEnd = location.lastIndexOf('/', rootDirEnd - 2) + 1; |
|
|
|
|