org.zodiac.autoconfigure.feign.context.DefaultFeignContextAutoConfiguration 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 DefaultFeignContextAutoConfiguration {
public DefaultFeignContextAutoConfiguration() {
super();
}
@Bean
@ConditionalOnMissingBean
protected org.zodiac.feign.core.context.DefaultFeignContextConfigurer defaultFeignContextConfigurer() {
return new org.zodiac.feign.core.context.DefaultFeignContextConfigurer();
}
/*Lower priority*/
@Bean
@ConditionalOnMissingBean
protected org.zodiac.feign.core.context.FeignRpcContextHolder feignRpcContextHolder(org.zodiac.feign.core.context.DefaultFeignContextConfigurer defaultFeignContextConfigurer) {
return defaultFeignContextConfigurer.feignRpcContextHolder();
}
}