spring-cloud-samples / feign-eureka

Example of using feign with eureka
236 stars 165 forks source link

org.springframework.cloud.openfeign.EnableFeignClients#defaultConfiguration. Is there a problem with its priority #19

Closed ynfatal closed 4 years ago

ynfatal commented 4 years ago

version: 2.2.2.RELEASE i want to use FeignConfiguration as global configuration, and specify the configuration FooConfiguration for the IAnotherClient separately. why can't Fooconfiguration coverage the FeignConfiguration? Why use the following approach to customize global configuration over custom local configuration?

@EnableFeignClients(defaultConfiguration = FeignConfiguration.class)
public class OpenfeignConsumerExampleApplication {
@FeignClient(value = "OPENFEIGN-PROVIDER-EXAMPLE",
        fallback = AnotherFallback.class,
        contextId = "IAnotherClient",
        configuration = FooConfiguration.class)
public interface IAnotherClient {