Spring声明式事务管理老是出现如下报错,求好心人解答一下

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private jdbc.transaction.BookShopDao jdbc.transaction.BookService.bookShopDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookShopDao' defined in file [F:\workspace\spring-1\bin\jdbc\transaction\BookShopDaoImp.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private jdbc.transaction.BookShopDao jdbc.transaction.BookService.bookShopDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bookShopDao' defined in file [F:\workspace\spring-1\bin\jdbc\transaction\BookShopDaoImp.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required

错误创建bean的名称为deptBiz的“定义在类路径资源的ApplicationContext-thistong.xml]:错误设置属性值;嵌套异常是org.springframework.beans.notwritablepropertyexception:无效的属性”deptBiz的bean类[com.thistong。 service.impl.userserviceimpl]:bean属性的EmpDAO
的'不写,或有一个无效的setter方法。
1、setter方法的参数类型不匹配的getter的返回类型导致。
2、为需要代理的目标类抽出接口。追问

我程序中没有setter方法 都是用@autowired自动注入的
请问您能再讲细一点么 到底是哪里的错误

温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网