当前位置: 代码迷 >> Java Web开发 >> 搭建SSH框架时出现错误
  详细解决方案

搭建SSH框架时出现错误

热度:285   发布时间:2010-07-30 09:40:28.0
搭建SSH框架时出现错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService' 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.test.impl.dao.Test2DAO] to required type [com.test.dao.ItestDao] for property 'testDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.test.impl.dao.Test2DAO] to required type [com.test.dao.ItestDao] for property 'testDao': no matching editors or conversion strategy found


这是什么问题呢,怎么结局?各位高手麻烦给个答案
搜索更多相关主题的帖子: SSH  框架  

----------------解决方案--------------------------------------------------------
提示: 作者被禁止或删除 内容自动屏蔽
2010-07-30 14:56:55
hsh_1987

等 级:职业侠客
威 望:4
帖 子:92
专家分:343
注 册:2010-3-30
3
  得分:1 
把这个文件applicationContext.xml放到/WEB-INF目录下就OK
----------------解决方案--------------------------------------------------------
java.lang.IllegalArgumentException: Cannot convert value of type [com.test.impl.dao.Test2DAO] to required type [com.test.dao.ItestDao] for property 'testDao'

似乎还是找到IOC的配置文件了,只是配置中类型与你要获得的bean的类型不匹配。检查一下。
----------------解决方案--------------------------------------------------------
  相关解决方案