Error creating bean with name 'waterInfoController': Injection of resource dependencies failed; nest...

Spring依赖注入失败问题
本文解决了一个关于Spring框架中依赖注入失败的问题,具体为在waterInfoController类中未能找到utils.FileUpload类型的bean定义,导致资源依赖注入失败。解决方案是确保utils包被Spring正确扫描。
 Error creating bean with name 'waterInfoController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [utils.FileUpload] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)} 

表示在waterController类中  [utils.FileUpload] 没有被组件扫描到 

解决方案:把utils这个包放在扫描包

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值