Bean初始化异常

时间:2014-05-31 13:22:52

标签: java spring

我是Spring的新手。当我运行一个进程时,我得到了这个异常。任何指针如何克服它?

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'odinConfigurer' defined in class path resource [CMA-dao.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationUtils.getAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

1 个答案:

答案 0 :(得分:0)

看起来像

您正在使用

     public static <A extends Annotation> A getAnnotation(AnnotatedElement element,
                                             Class<A> annotationType)

但正确的签名是

    public static <A extends Annotation> A getAnnotation(Method method,
                                             Class<A> annotationType)

请参阅java.lang.NoSuchMethodError org.springframework.core.annotation.AnnotationUtils.getAnnotation