Reset common caches before LifecycleProcessor-initiated checkpoint
See gh-29921
This commit is contained in:
parent
8c6287ef7b
commit
25a1e8d414
|
|
@ -463,7 +463,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||
|
||||
@Override
|
||||
public void setApplicationStartup(ApplicationStartup applicationStartup) {
|
||||
Assert.notNull(applicationStartup, "applicationStartup must not be null");
|
||||
Assert.notNull(applicationStartup, "ApplicationStartup must not be null");
|
||||
this.applicationStartup = applicationStartup;
|
||||
}
|
||||
|
||||
|
|
@ -628,9 +628,6 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||
}
|
||||
|
||||
finally {
|
||||
// Reset common introspection caches in Spring's core, since we
|
||||
// might not ever need metadata for singleton beans anymore...
|
||||
resetCommonCaches();
|
||||
contextRefresh.end();
|
||||
}
|
||||
}
|
||||
|
|
@ -946,8 +943,10 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||
* onRefresh() method and publishing the
|
||||
* {@link org.springframework.context.event.ContextRefreshedEvent}.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
protected void finishRefresh() {
|
||||
// Reset common introspection caches in Spring's core infrastructure.
|
||||
resetCommonCaches();
|
||||
|
||||
// Clear context-level resource caches (such as ASM metadata from scanning).
|
||||
clearResourceCaches();
|
||||
|
||||
|
|
@ -968,6 +967,9 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||
*/
|
||||
protected void cancelRefresh(BeansException ex) {
|
||||
this.active.set(false);
|
||||
|
||||
// Reset common introspection caches in Spring's core infrastructure.
|
||||
resetCommonCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue