org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO': no matching editors or conversion strategy found 基于MyEclipse的SSH整合 http://blog.csdn.net/JessieLee_YoYo/archive/2009/11/25/4871901.aspx
就是参照他弄了的,最后还是出了一个错误,不知道怎么解决,求各位帮帮忙!
就是参照他弄了的,最后还是出了一个错误,不知道怎么解决,求各位帮帮忙!
与 application.xml 中配置的不区配。
Failed to convert property value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO]
如果是接口,看看实现类实现的是否是对应的接口
<bean id="UserDAO" class="XXX.UserDAOImpl">
</bean>
看一下XXX.UserDAOImpl是不是写的正确能对应到具体的实现类上面其次是否创建了
Interface:UserDAO
和实现类:UserDAOImpl楼主的问题是spring在bean初始化的时候不能根据配置文件找到对应的bean,所以出现以上问题只要关心你的spring配置文件就可以了