当前位置: 代码迷 >> 综合 >> BUG合集----org.springframework.beans.factory.BeanCreationException: Error creating bean with name XXXX
  详细解决方案

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

热度:61   发布时间:2023-11-21 10:11:27.0

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

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”,到这里相信你该知道怎么该了吧。

 
 


    

  相关解决方案