Error creating bean with name '***': Injection of resource dependencies failed,Bean named 'redisService' is expected to be of type


Caused by: org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'epAtreusEquipmentInfoServiceImpl': 
Injection of resource dependencies failed; 
nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException:
Bean named 'redisService' is expected to be of type 'com.xiaojukeji.epower.atreus.biz.service.redis.ConnectorRedisService' 
but was actually of type 'com.xiaojukeji.epower.direct.core.service.RedisService'

异常出现的背景:

@Autowired
private RedisService redisService;
@Resource
private ConnectorRedisService redisService;

以上同属姓名同时出现即会报错

改成这个就不会报错,或者属姓名不相同也可以

@Autowired
private ConnectorRedisService redisService;


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM