org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘departmentAction’ defined in file [G:\eclipse_workspace.metadata.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps\itcast_crm1\WEB-INF\classes\applicationContext-action.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: **Failed to convert property value of type 'com.sun.proxy.$Proxy8 implementing cn.itcast.crm.service.ISystemLogService,cn.itcast.crm.service.IBaseService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised' to required type 'cn.itcast.crm.service.IDepartmentService' for property 'service'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.sun.proxy.$Proxy8 implementing**
cn.itcast.crm.service.ISystemLogService,cn.itcast.crm.service.IBaseService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [cn.itcast.crm.service.IDepartmentService] for property ‘service’: no matching editors or conversion strategy found
仔细阅读异常错误信息可以发现 是bean的配置出现问题
<bean id="departmentAction" class="cn.itcast.crm.web.action.DepartmentAction" scope="prototype">
<property name="service" ref="systemLogService">
</property>
</bean>
配置文件的引用ref配错了 应该写成departmentService
如果出现类似错误可以参照我的思路 排除下错误