使用自动注入集合类时候提示

Description:

Field xxx in com.XXX.xxx required a single bean, but 3 were found:

Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

解决

  1. 参考docs.spring.io
  2. 在其中一个个bean上添加@Primary