问题描述
注入如下bean
报错 org.springframework.beans.factory.BeanNotOfRequiredTypeException : Bean named 'defaultStartProcessOper' must be of type [com.todaytech.pwp.workflow.facade.DefaultStartProcessOper], but was actually of type [$Proxy61]
注入的bean如下
解决方法
将注入的属性的类,改为接口,不是具体的类
Spring动态代理的实现方式决定如果要注入的类是实现了接口的,注入的时候只能注入到接口,不可注入到具体的类