org.zodiac.autoconfigure.feign.ReactiveFeignContextConfiguration Maven / Gradle / Ivy
package org.zodiac.autoconfigure.feign;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication.Type;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.feign.condition.ConditionalOnFeignConsumerEnabled;
@SpringBootConfiguration
@ConditionalOnFeignConsumerEnabled
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnClass(value = {feign.Client.class, org.zodiac.feign.core.FeignConsumerClientProvider.class})
class ReactiveFeignContextConfiguration {
public ReactiveFeignContextConfiguration() {
super();
}
@Bean
@ConditionalOnMissingBean
protected org.zodiac.feign.core.config.ReactiveFeignContextConfigurer reactiveFeignContextConfigurer() {
return new org.zodiac.feign.core.config.ReactiveFeignContextConfigurer();
}
@Bean
@ConditionalOnMissingBean
protected feign.RequestInterceptor requestInterceptor(org.zodiac.feign.core.config.ReactiveFeignContextConfigurer reactiveFeignContextConfigurer) {
return reactiveFeignContextConfigurer.requestInterceptor();
}
@Bean
@ConditionalOnMissingBean
protected org.zodiac.feign.core.context.internal.ProviderFeignContextFilter cloudProviderFeignContextFilter(org.zodiac.feign.core.config.ReactiveFeignContextConfigurer reactiveFeignContextConfigurer) {
return reactiveFeignContextConfigurer.cloudProviderFeignContextFilter();
}
}