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