Leniently tolerate late bean retrieval during destroySingletons()
Closes gh-22526 Closes gh-29730
This commit is contained in:
@@ -85,12 +85,11 @@ public class Service implements ApplicationContextAware, MessageSourceAware, Dis
|
||||
Assert.state(applicationContext.getBean("messageSource") instanceof StaticMessageSource,
|
||||
"Invalid MessageSource bean");
|
||||
try {
|
||||
// Should not throw BeanCreationNotAllowedException on 6.2 anymore
|
||||
applicationContext.getBean("service2");
|
||||
// Should have thrown BeanCreationNotAllowedException
|
||||
properlyDestroyed = false;
|
||||
}
|
||||
catch (BeanCreationNotAllowedException ex) {
|
||||
// expected
|
||||
properlyDestroyed = false;
|
||||
}
|
||||
});
|
||||
thread.start();
|
||||
|
||||
Reference in New Issue
Block a user