diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java index fe4d2202a9..a21c0f899e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java @@ -265,6 +265,10 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean catch (IllegalStateException ex) { throw new BeanCreationException(beanName, "Lookup method resolution failed", ex); } + catch (NoClassDefFoundError err) { + throw new BeanCreationException(beanName, "Failed to introspect bean class [" + beanClass.getName() + + "] for lookup method metadata: could not find class that it depends on", err); + } this.lookupMethodsChecked.add(beanName); }