Wrap depends-on exception for specifically requested top-level bean

Closes gh-32470
This commit is contained in:
Juergen Hoeller
2024-04-24 13:41:48 +02:00
parent 4a10bc3288
commit 387e34d881
2 changed files with 11 additions and 1 deletions

View File

@@ -949,7 +949,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
// Initialize LoadTimeWeaverAware beans early to allow for registering their transformers early.
String[] weaverAwareNames = beanFactory.getBeanNamesForType(LoadTimeWeaverAware.class, false, false);
for (String weaverAwareName : weaverAwareNames) {
getBean(weaverAwareName);
beanFactory.getBean(weaverAwareName, LoadTimeWeaverAware.class);
}
// Stop using the temporary ClassLoader for type matching.