'Define multiple clients in spring cloud openFeign, prompting bean not found

I have defined two FeignClients in my project, but when I start the project, it prompts bean not found, the following is my code

@FeignClient(value = "aurora-message",name = "aurora-message",
        fallback = MessageLogFeignService.MessageLogFeignServiceFallBack.class,
        contextId = "globalAuroraMessageLog",
        qualifiers = "globalAuroraMessageLog")
public interface MessageLogFeignService {

    @PostMapping("/message/messageLog")
    ModifyResult insertMessageLog(@SpringQueryMap MessageLogDO messageLogDO) throws BindException;
}
@FeignClient(value = "aurora-message",
        contextId = "adminAuroraMessageEmail",
        qualifiers = "adminAuroraMessageEmail")
public interface EmailFeignService {

    @PostMapping("/message/email")
    ModifyResult insertEmail(@SpringQueryMap EmailDO email);
    
}

the main class

@EnableDiscoveryClient
@SpringBootApplication
@EnableOpenApi
@EnableWebMvc
@EnableFeignClients(basePackages = {"xyz.xcye.web.common.service.feign","xyz.xcye.admin.feign"})
public class AuroraAdminMain {
    public static void main(String[] args) {
        SpringApplication.run(AuroraAdminMain.class, args);
    }
}

the error message info

Description:

Field rabbitMQSendService in xyz.xcye.admin.service.impl.UserServiceImpl required a bean named 'feign.Request.Options-globalAuroraMessageLog' that could not be found.

The injection point has the following annotations:
    - @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean named 'feign.Request.Options-globalAuroraMessageLog' in your configuration.

But if there is only one feignClient(MessageLogFeignService), the program can start successfully, how to solve this problem



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source