警告: Exception encountered during context initialization - cancelling refresh attempt:

今天写Spring遇到了一个坑爹的问题,那么因为啥原因呢?
错误提示我错误的加载了Bean

警告: Exception encountered during context initialization - cancelling refresh attempt:
 org.springframework.beans.factory.BeanCreationException: 

我去看了一下我的切面类:
警告: Exception encountered during context initialization - cancelling refresh attempt:_第1张图片

advice后面应该是ref而不是value,需要的是一个引用而不是String,难怪后面会报错:
Cannot convert value of type ‘java.lang.String’ to required type ‘org.aopalliance.aop.Advice’ for property ‘advice’: no matching editors or conversion strategy found
真是大意。。
遇到这种错不是注解写少了就是写错了,亦或是applicationContext.xml中名字写错了要么就是value写成了ref,或者ref写成了value。

你可能感兴趣的:(Spring,Spring异常)