spring 全注解 扫包问题
来源:互联网 发布:java方法里面调用方法 编辑:程序博客网 时间:2024/04/30 06:22
Error creating bean with name 'roleController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.rails.espm.core.service.RoleService cn.rails.espm.core.controller.system.RoleController.roleService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.rails.espm.core.dao.RoleDao cn.rails.espm.core.service.serviceImpl.RoleServiceImpl.roleDao; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleDao' defined in file [D:\apache-tomcat-7.0.68\webapps\ESPM\WEB-INF\classes\cn\rails\espm\core\dao\daoImpl\RoleDaoImpl.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
问题挺有意思,解决方案也挺有意思 配置文件中 <beans xmlns=..... default-autowire="byName">
如果你的service 及dao中 @Service("userService") 等 没问题 加上 default-autowire="byName" 即可
- spring 全注解 扫包问题
- Spring扫包问题
- Spring MVC 注解 initMethod 扫包
- 利用Spring扫包实现发现具体的注解类
- 关于spring,springmvc 整合框架注解扫面的问题,
- spring 自动扫包代码放置的位置问题
- springMVC 注解扫面顺序问题
- 使用spring全注解实现继承时遇到的问题
- Spring+CXF 全注解版
- Spring完整配置文件带注释(自动扫包)
- Spring完整配置文件带注释(自动扫包)
- spring 注解问题
- Spring @Value注解问题
- spring注解问题
- Spring 反射注入+全注解注入
- Spring MVC 配置全注解开发
- Spring 反射注入+全注解注入
- Spring 反射注入+全注解注入
- XSS
- Java ConcurrentModificationException异常原因和解决方法
- redmine升级
- Android 五步修改状态栏颜色
- Rest-Assured 设置Request Timeout
- spring 全注解 扫包问题
- Activity的生命周期
- 用java做一个最小的操作系统内核
- unbuntu配置tomcat的startup.sh文件
- Spring MVC 传入List参数的接收问题
- 高德地图多点线路规划
- Android Fragment 深度解析
- BZOJ2632: [neerc2011]Gcd guessing game
- #linux初次总结(简单操作)