在带有泛型的类中使用@Resource时,报了如下错误信息:

BUG合集----org.springframework.beans.factory.BeanCreationException: Error creating bean with name XXXX

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'saleChanceService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.zwl.base.BaseMapper<?, ?>' available: expected single matching bean but found 4: cusDevPlanMapper,roleMapper,saleChanceMapper,userMapper

意思是Bean绑定错误,错误原因:“在带有泛型的类中使用注解完成自动注入时,注解只能使用@Autowired”,到这里相信你该知道怎么该了吧。

 


    

相关文章:

  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-09-19
  • 2022-12-23
猜你喜欢
  • 2021-05-16
  • 2021-06-19
  • 2021-05-22
  • 2021-07-14
  • 2021-09-17
  • 2021-11-01
  • 2021-12-29
相关资源
相似解决方案