Local root directory and jar caching in PathMatchingResourcePatternResolver

Closes gh-21190
This commit is contained in:
Juergen Hoeller
2024-03-08 19:12:14 +01:00
parent 729dc0b671
commit 19fec0633f
2 changed files with 137 additions and 22 deletions

View File

@@ -1021,6 +1021,14 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
CachedIntrospectionResults.clearClassLoader(getClassLoader());
}
@Override
public void clearResourceCaches() {
super.clearResourceCaches();
if (this.resourcePatternResolver instanceof PathMatchingResourcePatternResolver pmrpr) {
pmrpr.clearCache();
}
}
/**
* Register a shutdown hook {@linkplain Thread#getName() named}