All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.autoconfigure.hystrix.ReactivePlatformHystrixAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.hystrix;

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.springframework.core.annotation.Order;
import org.zodiac.autoconfigure.hystrix.condition.ConditionalOnFeignHystrixEnabled;

@SpringBootConfiguration
@ConditionalOnWebApplication(type = Type.REACTIVE)
@ConditionalOnFeignHystrixEnabled
@ConditionalOnClass(value= {com.netflix.hystrix.Hystrix.class, feign.Feign.class, feign.hystrix.HystrixFeign.class, org.zodiac.hystrix.core.PlatformHystrixConcurrencyStrategy.class})
public class ReactivePlatformHystrixAutoConfiguration {

    public ReactivePlatformHystrixAutoConfiguration() {
    }

    @Bean
    @ConditionalOnMissingBean
    protected org.zodiac.hystrix.core.config.ReactivePlatformHystrixConfigurer reactivePlatformHystrixConfigurer() {
        return new org.zodiac.hystrix.core.config.ReactivePlatformHystrixConfigurer();
    }

    @Bean
    @Order(value = 0)
    @ConditionalOnMissingBean
    protected feign.RequestInterceptor requestInterceptor(org.zodiac.hystrix.core.config.ReactivePlatformHystrixConfigurer reactivePlatformHystrixConfigurer) {
        return reactivePlatformHystrixConfigurer.requestInterceptor();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy