您的位置:首页 > 编程语言 > Java开发

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.itcast.j

2017-05-02 11:30 567 查看
报错信息:

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.itcast.jk.dao.BaseDao]: Specified class is an interface


解决方法:重新拷贝application-dao.xml

其实是要把:      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 中的-3.0去掉这很重要
还有就是注意
//这里是要引入实现类,不是接口,易错
<bean id="deptService" class="cn.itcast.jk.service.impl.DeptServiceImpl">
<property name="baseDao" ref="baseDao"></property>
</bean>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐