struts,hibernate,spring配置出现问题

来源:百度知道 编辑:UC知道 时间:2024/06/14 05:39:36
严重: action: null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '/main' defined in ServletContext resource [/WEB-INF/action-servlet.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.accp.service.WorkerServiceDAOImpl] to required type [com.accp.service.IWorkerServiceDAO] for property 'workerServiceDAO'; nested exception is java.lang.IllegalArgumentException: No matching editors or conversion strategy found
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.accp.service.WorkerServiceDAOImpl] to required

需要注入一个com.accp.service.IWorkerServiceDAO
你注入了一个com.accp.service.WorkerServiceDAOImpl类型的对象,无法强制转换成上面那个类,所以出错了。仔细查查,看看哪个property注入错了。

'workerServiceDAO' 没有找到对应的配置方法