BeanNotOfRequiredTypeException: Bean named "" must be of type [] but was actually of type [com.sun.p

来源:互联网 发布:阿里云企业邮箱的smtp 编辑:程序博客网 时间:2024/05/22 18:44
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"/> 
0 0
原创粉丝点击