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;

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

上一篇:在页面中禁止alert弹出框


下一篇:简单uart通信