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.(高版本会自动选择)