From 304107126925f9935163229ac3c56566c62ed044 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 2 Oct 2025 21:53:47 +0200 Subject: [PATCH] Consistently apply useCaches for single Resource lookup Closes gh-35465 --- .../core/io/support/PathMatchingResourcePatternResolver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0ecabb7e19d..dfef714392e 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 @@ -395,7 +395,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol } else { // a single resource with the given name - return new Resource[] {getResourceLoader().getResource(locationPattern)}; + return new Resource[] {getResource(locationPattern)}; } } }