File tree 1 file changed +4
-3
lines changed
spring-core/src/main/java/org/springframework/core/io/support
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -284,9 +284,10 @@ public Resource[] getResources(String locationPattern) throws IOException {
284
284
}
285
285
}
286
286
else {
287
- // Only look for a pattern after a prefix here
288
- // (to not get fooled by a pattern symbol in a strange prefix).
289
- int prefixEnd = locationPattern .indexOf (":" ) + 1 ;
287
+ // Generally only look for a pattern after a prefix here,
288
+ // and on Tomcat only after the "*/" separator for its "war:" protocol.
289
+ int prefixEnd = (locationPattern .startsWith ("war:" ) ? locationPattern .indexOf ("*/" ) + 1 :
290
+ locationPattern .indexOf (":" ) + 1 );
290
291
if (getPathMatcher ().isPattern (locationPattern .substring (prefixEnd ))) {
291
292
// a file pattern
292
293
return findPathMatchingResources (locationPattern );
You can’t perform that action at this time.
0 commit comments