事务整合BeanNotOfRequiredTypeException: Bean named must be of type [] but was actually of type

org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'UserService' must be of type [com.service.impl.UserServiceImpl], but was actually of type [$Prox38]

原因1:

使用了jdk的自动动态代理,需要在<aop:aconfig中添加proxy-target-class="true"   如下:

<aop:aconfig  proxy-target-class="true"/>  这时使用cglib.(高版本会自动选择)

猜你喜欢

转载自blog.csdn.net/xclsgfr/article/details/84964660