老师好,请教一个问题:
注入时会报错:
Could not autowire. There is more than one bean of ‘AuthorityFeignClient’ type.
There is already ‘authorityFeignClientFallback’ bean method
service.communication.hystrix.AuthorityFeignClientFallback#getTokenByFeign(UsernameAndPassword) mapped.
我这里是否是spring无法确定注入哪里一个bean导致的?但是只要是使用fallback就会需要定义个实现类,spring在注入bean时就无法得知具体注入哪个实现类了?
这里能通过@Qualifier来指定使用代理类实例注入吗?
@FeignClient(
contextId = "AuthorityFeignClient",
name = "e-commerce-authority-center",
fallback = AuthorityFeignClientFallback.class
)