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


今天寫Spring遇到了一個坑爹的問題,那么因為啥原因呢?
錯誤提示我錯誤的加載了Bean

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

我去看了一下我的切面類:
在這里插入圖片描述

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。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Spring AOP:Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in mybatis Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'homeControll Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'advertiseRestControll org.springframework.web.context.support.XmlWebApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreatio 整合spring與mybatis(Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'services' de) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDaoImpl' defined in file 【flyway】Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' def 開發Spring過程中幾個常見異常(二):Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'a' define
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM