相关推荐recommended
SpringBoot中提示required a single bean, but 2 were found
作者:mmseoamin日期:2024-02-05
两种解决办法:
一.
1.把其一个bean加上@Primary注解

2.在注入的属性添加@Qualifier注解

二. 

Springboot启动类添加了的扫描注解@xxxSan,需要配置好扫描范围,否则就会出现重复扫描。