zoukankan      html  css  js  c++  java
  • 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;
    
    今天你进步了吗?
  • 相关阅读:
    css定位
    Register Form
    自我介绍
    靠,用 mod_proxy_ajp 代替 mod_jk 不知简单多少倍
    Mac 切换 32 和 64
    JAVA面向对象(8)
    JAVA面向对象(7)
    JAVA面向对象(6)
    JAVA面向对象(5)
    JAVA面向对象(4)
  • 原文地址:https://www.cnblogs.com/woooodlin/p/15107882.html
Copyright © 2011-2022 走看看