org.zodiac.autoconfigure.feign.context.IstioFeignContextAutoConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.feign.context;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.feign.condition.ConditionalOnFeignConsumerEnabled;
@SpringBootConfiguration
@ConditionalOnFeignConsumerEnabled
@ConditionalOnClass(value = {feign.Client.class, org.zodiac.feign.core.FeignConsumerClientProvider.class})
public class IstioFeignContextAutoConfiguration {
public IstioFeignContextAutoConfiguration() {
}
@Bean
@ConditionalOnMissingBean
protected org.zodiac.feign.istio.context.IstioFeignContextConfigurer istioFeignContextConfigurer() {
return new org.zodiac.feign.istio.context.IstioFeignContextConfigurer();
}
@Bean
@ConditionalOnMissingBean
protected org.zodiac.feign.core.context.FeignRpcContextHolder feignRpcContextHolder(
org.zodiac.feign.istio.context.IstioFeignContextConfigurer istioFeignContextConfigurer) {
return istioFeignContextConfigurer.istioFeignRpcContextHolder();
}
}