bean依赖注入错误:Error creating bean with name 'itemService': Injection of autowired dependencies failed
来源:互联网 发布:韦德体测数据 编辑:程序博客网 时间:2024/05/16 20:23
错误代码(贴的前部分):
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'itemService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.taotao.manage.service.ItemDescService com.taotao.manage.service.ItemService.itemDescService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.taotao.manage.service.ItemDescService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
错误原因:
再service上@Service注解忘记添加了,导致bean找不到ItemDescService。
SSM书写步骤大致如下:
contorller
@RequestMapping(value="item")@Controllerpublic class ItemContorller {@Autowiredprivate ItemService itemService;}service
@Servicepublic class ItemService extends BaseService<Item>{@Autowiredprivate ItemMapper itemMapper;}mapper,继承pojo
public interface ItemMapper extends Mapper<Item> {}
阅读全文
3 0
- bean依赖注入错误:Error creating bean with name 'itemService': Injection of autowired dependencies failed
- Error creating bean with name '****': Injection of autowired dependencies failed
- Error creating bean with name 'adminUserController': Injection of autowired dependencies failed;
- Error creating bean with name 'xx': Injection of autowired dependencies failed
- Error creating bean with name 'xxxx': Injection of autowired dependencies failed;
- Error creating bean with name 'empresasDAO': Injection of autowired dependencies failed up vote 0
- Error creating bean with name 'XXX': Injection of autowired dependencies failed解决办法
- Java-4-解决报错:Error creating bean with name 'globalAppObj': Injection of autowired dependencies failed
- 出现:Error creating bean with name 'xxxxxController': Injection of autowired dependencies failed;
- Error creating bean with name '***(类名)': Injection of autowired dependencies failed;
- Error creating bean with name 'assetQueryController': Injection of autowired dependencies failed; ne
- Error creating bean with name 'userServiceImpl': Injection of autowired dependencies failed
- springMVC项目启动时出现bean注入失败的情况:Error creating bean with name 'XXX': Injection of autowired dependencies
- rror creating bean with name 'adminController': Injection of autowired dependencies failed;
- Error creating bean with name 'com.you.user.dao.StudentDaoTest': Injection of autowired dependencies
- spring问题:Error creating bean with name 'articleController': Injection of autowired dependencies fail
- jboss服务启动时报Error creating bean with name'addressService': Injection of autowired dependencies faile
- Error creating bean with name 'contentTypeAdminController': Injection of autowired dependencies fail
- 【NOIP2017】Day6
- JZOJ3418. 【NOIP动态规划专题】选课(2017.8DP&贪心专题)
- 8月9日总结
- 守护进程的实现
- HttpClient
- bean依赖注入错误:Error creating bean with name 'itemService': Injection of autowired dependencies failed
- mysql数据类型
- 在Unity3D中使用Visual Studio调试shader
- HDU 1241 Oil Deposits DFS求连通块
- 刚培训出来的我,java博客第一天,努力成为大牛
- Class对象-单例
- oracle(二)
- 生产者和消费者问题
- 高斯消元