BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type

Posted 面具人生lql

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type 相关的知识,希望对你有一定的参考价值。

org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'applicationService' must be of type [com.meta.dbcenter.application.service.impl.ApplicationServiceImpl], but was actually of type [com.sun.proxy.$Proxy7]     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:360)

原因1:
使用了jdk的自动动态代理,需要在<aop:aspectj-autoproxy中添加proxy-target-class="true"   如下: <aop:aspectj-autoproxy  proxy-target-class="true"/>

以上是关于BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type 的主要内容,如果未能解决你的问题,请参考以下文章