AnnotationUtils.clearCache() includes all annotation caches

Closes gh-31170

(cherry picked from commit 78fce80c43)
This commit is contained in:
Juergen Hoeller
2023-09-11 17:36:32 +02:00
parent 0c3d8d7a44
commit 39c225c813
5 changed files with 12 additions and 8 deletions

View File

@@ -1083,6 +1083,9 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
// Let subclasses do some final clean-up if they wish...
onClose();
// Reset common introspection caches to avoid class reference leaks.
resetCommonCaches();
// Reset local application listeners to pre-refresh state.
if (this.earlyApplicationListeners != null) {
this.applicationListeners.clear();